Skip to content

[Extensibility Request] issue 30377: add OnBeforePrintOnlyIfSalesCheck event in Item Sales Statistics report - #9777

Open
AleksandricMarko wants to merge 1 commit into
mainfrom
ai-ext-fix/ext_issue-30377
Open

[Extensibility Request] issue 30377: add OnBeforePrintOnlyIfSalesCheck event in Item Sales Statistics report#9777
AleksandricMarko wants to merge 1 commit into
mainfrom
ai-ext-fix/ext_issue-30377

Conversation

@AleksandricMarko

@AleksandricMarko AleksandricMarko commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

The report 10135 "Item Sales Statistics" calculates Sales (Qty.) via CalcFields and, in the same trigger, decides whether to CurrReport.Skip() the record based on the private PrintOnlyIfSales flag before any extension code runs. Extensions that compute alternate-UOM sales figures cannot influence this skip decision because PrintOnlyIfSales has no accessible getter and the skip happens before the table's OnAfterGetRecord trigger fires. This PR exposes the already-computed skip decision through a new integration event so subscribers can override whether an item is skipped, in either direction.

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

Changes Made

  • Report 10135 "Item Sales Statistics" - In the Item data item OnAfterGetRecord trigger, the inline PrintOnlyIfSales skip check was factored into a local SkipRecord boolean and a new integration event OnAfterGetRecordItemOnBeforePrintOnlyIfSalesCheck(var Item; PrintOnlyIfSales; var SkipRecord) is raised after CalcFields and before CurrReport.Skip(), letting subscribers override the skip decision. Added the matching event publisher. Behavior is unchanged when no subscriber is present.

Fixes AB#644155

…Check event in Item Sales Statistics report

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AleksandricMarko AleksandricMarko added event-request SCM GitHub request for SCM area labels Jul 28, 2026
@github-actions github-actions Bot added this to the Version 29.0 milestone Jul 28, 2026
@AleksandricMarko
AleksandricMarko marked this pull request as ready for review July 28, 2026 10:00
@AleksandricMarko
AleksandricMarko requested a review from a team July 28, 2026 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

event-request SCM GitHub request for SCM area

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant