AL
AL copied to clipboard
Usage of the CurrReport.Skip method in report extensions
1. Describe the bug The usage of the CurrReport.Skip method in the OnBeforeAfterGetRecord trigger doesn't influence on the execution of the OnAfterGetRecord trigger of the corresponding data item.
Could you please check whether it is expected behavior (limitation for the report extensions objects) or not (it is a bug)?
2. To Reproduce Steps to reproduce the behavior:
- Create a new app with the following report extension:
reportextension 50100 "TEST Get Item Ledger Entries" extends "Get Item Ledger Entries"
{
dataset
{
modify("Item Ledger Entry")
{
trigger OnBeforeAfterGetRecord()
begin
CurrReport.Skip();
end;
}
}
}
- Add the following breakpoints:
- in the first line of the OnBeforeAfterGetRecord trigger (in the report extension)
- in the first line of the OnAfterGetRecord trigger of the "Item Ledger Entry" data item (in the original report)
- Publish and debug an app.
- Run report 594 (Get Item Ledger Entries).
3. Expected behavior The OnAfterGetRecord trigger of the "Item Ledger Entry" data item is not executed.
4. Actual behavior The OnAfterGetRecord trigger of the "Item Ledger Entry" data item is executed.
5. Versions:
- AL Language: v9.0.615906
- Visual Studio Code: 1.67.1
- Business Central: 20.1 BE
- List of Visual Studio Code extensions that you have installed: unrelated
#6949