Skip to content

[Extensibility Request] issue 29640: use document type enum in blocked customer event - #10520

Draft
Marko Aleksandric (AleksandricMarko) wants to merge 2 commits into
mainfrom
ai-ext-fix/ext_issue-29640
Draft

[Extensibility Request] issue 29640: use document type enum in blocked customer event#10520
Marko Aleksandric (AleksandricMarko) wants to merge 2 commits into
mainfrom
ai-ext-fix/ext_issue-29640

Conversation

@AleksandricMarko

@AleksandricMarko Marko Aleksandric (AleksandricMarko) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Extensions need the blocked-customer check to preserve extensible general journal document type values instead of reducing them to an option integer. This PR changes the event contract to use the Gen. Journal Document Type enum and publishes the enum value directly.

Source issue repository: microsoft/AlAppExtensions; issue number: 29640

Changes Made

  • Customer.OnBeforeCheckBlockedCust - changed DocType from an option to the extensible Gen. Journal Document Type enum and removed the integer conversion across W1 and all existing layer counterparts.

Fixes AB#620150

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added Finance GitHub request for Finance area and removed SCM GitHub request for SCM area labels Aug 21, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Aug 21, 2026
@AleksandricMarko

Copy link
Copy Markdown
Contributor Author

Copilot

it is not allowed to replace type of parameter in OnBeforeCheckBlockedCust
instead, you need to create new event with updated parameters, to obsolete existing event and also all calls of existing event to surround with if not CLEAN

Co-authored-by: AleksandricMarko <133204513+AleksandricMarko@users.noreply.github.com>

Copilot AI commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Copilot

it is not allowed to replace type of parameter in OnBeforeCheckBlockedCust
...

Implemented in commit a18ef8bb.

  • Restored OnBeforeCheckBlockedCust with original Option DocType under #if not CLEAN29.
  • Marked the legacy event obsolete.
  • Added new enum-based event OnBeforeCheckBlockedCust2.
  • Updated publishers to call the legacy event only in non-CLEAN builds and then the new event when not already handled.
  • Propagated the same change across all affected layer files.

@github-actions github-actions Bot added the needs-approval Workflow runs require maintainer approval to start label Aug 21, 2026
@alexei-dobriansky

Copy link
Copy Markdown
Contributor

Agentic PR Review - Round 1

Recommendation: Accept

What this PR does

This PR keeps the existing OnBeforeCheckBlockedCust event as an obsolete compatibility event, then adds OnBeforeCheckBlockedCust2 with DocType as Enum "Gen. Journal Document Type". The change is applied to W1 and all current layer counterparts. The old event is still raised in non-CLEAN29 builds, and the new event is raised only when the old event did not already handle the blocked-customer check, so existing subscribers keep working while new subscribers can use the enum value.

Suggestions

None.

Risk assessment and necessity

Risk: This touches a public integration event on table 18 across all BaseApp layers, so the main risk is partner compatibility. The diff uses the safe obsoletion pattern instead of changing the old event signature in place, and the CI checks shown on the PR are green. I did not find a breaking event change in the current diff.

Necessity: The linked GitHub issue and AB work item describe a valid extensibility need: subscribers need the extensible document type value instead of an option integer. The scope is narrow and matches the request.


[AI-PR-REVIEW] version=1 promptVersion=2 system=github pr=10520 round=1 by=alexei-dobriansky at=2026-08-24T01:09:50Z lastSha=a18ef8bb3dd357bc095b3739d267b0fb5ec0ba6e reviewKey=9d8fde521c9222533030a388a8756b879ec24e401011115df47371e9089a2a72 suggestions=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event-request Finance GitHub request for Finance area needs-approval Workflow runs require maintainer approval to start

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants