You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 19, 2026. It is now read-only.
Create event to modify the layout state before printing but after a runmodal with the new method (Report Layout List 2000000234)
Describe the request
In CU44, there's a "FetchReportLayoutByCode" function to modify the layout before printing but after a runmodal.
Use with the old "Custom Report Layout". I can call a custom report before launching a report.
[EventSubscriber(ObjectType::Codeunit, Codeunit::ReportManagement, OnFetchReportLayoutByCode, '', false, false)]
localprocedure OnFetchReportLayoutByCode(ObjectId: Integer; LayoutCode: Text; var TargetStream: OutStream; var IsHandled: Boolean)var
CustomReportLayout: Record "Custom Report Layout";
TempBlobIn: codeunit "Temp Blob";
TempInStream: InStream;
lSingleInstance: Codeunit "NVW NaviWest SingleInstance";
begin
LayoutCode := lSingleInstance.GetLayout();
ifnot CustomReportLayout.Get(LayoutCode) then
LayoutCode := '';
if LayoutCode <> ''thenbegin
CustomReportLayout.GetLayoutBlob(TempBlobIn);
TempBlobIn.CreateInStream(TempInStream);
CopyStream(TargetStream, TempInStream);
IsHandled := true;
end;
end;
With the new method (Report Layout List 2000000234), is it possible to create a "OnFetchReportLayoutByCode" event to modify the layout state before printing but after a runmodal ? I haven't found a solution.
proposed_code_change: Provide the exact base code addition or modification with surrounding context showing where in the new report layout flow the event should be published.
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.
proposed_code_change: CU codeunit 2000000005 "Reporting Triggers"
// After runmodal report and before printing, in option report, fetching a new layout Name by AL code.
///
/// Business event that allows layout selection through a user interface, primarily used by the "Report Layouts" extension.
///
/// The ID of the report object.
/// The name of the selected layout.
/// The GUID of the app that provides the layout.
/// Indicates whether the layout selection was successful.
///
/// This event enables UI-based layout selection and is primarily used by the first-party "Report Layouts" extension to provide a user-friendly layout selection experience.
///
[BusinessEvent(false)]
procedure FetchReportLayoutUI(ObjectId: Integer; var LayoutName: Text; var LayoutAppID: Guid; var Success: Boolean)
begin
end;
The Event OnAfterSelectReportLayoutUI must be call BEFORE a RUNMODAL report. Whereas I want to modify my layout AFTER the runmodal. With the old "Custom Report Layout" method, the OnFetchReportLayoutByCode event handled this very well !
I need a FetchReportLayoutUI event that works with the new "Report Layout List" method, as I explained just above.
Since you do not understand my request, I will phrase it more simply: how do I modify a report's layout using AL code once the report has been launched ?
proposed_code_change: Provide the exact base code addition or modification with searchable surrounding context showing where the new event should be published in the new report layout flow.
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.
proposed_code_change: CU codeunit 2000000005 "Reporting Triggers"
// After runmodal report and before printing, in option report, fetching a new layout Name by AL code.
///
/// Business event that allows layout selection through a user interface, primarily used by the "Report Layouts" extension.
///
/// The ID of the report object.
/// The name of the selected layout.
/// The GUID of the app that provides the layout.
/// Indicates whether the layout selection was successful.
///
/// This event enables UI-based layout selection and is primarily used by the first-party "Report Layouts" extension to provide a user-friendly layout selection experience.
///
[BusinessEvent(false)]
procedure FetchReportLayoutUI(ObjectId: Integer; var LayoutName: Text; var LayoutAppID: Guid; var Success: Boolean)
begin
end;
proposed_code_change: Provide the exact base code addition or modification with searchable surrounding context showing precisely where in codeunit 2000000005 "Reporting Triggers" the new event should be published in the new report layout flow.
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with /not-accurate (optional: add a short explanation). Your feedback improves future responses.
Would it be suitable for your scenario if we add a new event, OnAfterGetSelectedReportLayout , in the SelectReportLayoutCode procedure of codeunit 44 Report Management ?
The event would be called after the current layout has been resolved but before it is returned to the reporting runtime:
SelectedLayoutName := DesignTimeReportSelection.GetSelectedLayout();
SelectedAppID := DesignTimeReportSelection.GetSelectedAppID();
if SelectedLayoutName = ''thenif ReportLayoutSelection.Get(ObjectId, CompanyName) and (ReportLayoutSelection.Type = ReportLayoutSelection.Type::"Custom Layout")then
SelectedLayoutName := ReportLayoutSelection."Custom Report Layout Code";
OnAfterGetSelectedReportLayout(ObjectId, SelectedLayoutName, SelectedAppID);
if (SelectedLayoutName <> '') and (StrLen(SelectedLayoutName) <= MaxStrLen(CustomReportLayout."Code"))then ...
The new event would be:
[IntegrationEvent(false, false)]
localprocedure OnAfterGetSelectedReportLayout(
ObjectId: Integer;
var LayoutName: Text[250];
var LayoutAppID: Guid)beginend;
This would allow subscribers to replace both the layout name and its application ID during late layout resolution and would support layouts from the new Report Layout List flow.
As this repo will be archived in few days, I will close the issue. In case you still need proper event request, please create new issue as part of BCApps repo (https://github.com/microsoft/BCApps/issues)
Activity
github-actions commentedon Jun 26, 2026
Hi CyrilleJsmt,
Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.
📚 Extensibility Guidelines
Missing Information:
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.CyrilleJsmt commentedon Jul 7, 2026
proposed_code_change: CU codeunit 2000000005 "Reporting Triggers"
// After runmodal report and before printing, in option report, fetching a new layout Name by AL code.
///
/// Business event that allows layout selection through a user interface, primarily used by the "Report Layouts" extension.
///
/// The ID of the report object.
/// The name of the selected layout.
/// The GUID of the app that provides the layout.
/// Indicates whether the layout selection was successful.
///
/// This event enables UI-based layout selection and is primarily used by the first-party "Report Layouts" extension to provide a user-friendly layout selection experience.
///
[BusinessEvent(false)]
procedure FetchReportLayoutUI(ObjectId: Integer; var LayoutName: Text; var LayoutAppID: Guid; var Success: Boolean)
begin
end;
github-actions commentedon Jul 7, 2026
Hi CyrilleJsmt,
Thank you for your extensibility request.
A similar event already exists in this location that may serve your purpose:
Existing event:
OnAfterSelectReportLayoutUILocation:
ReportManagement.Codeunit.alWould this existing event work for your scenario? If not, please explain why a new event is needed.
Please respond with confirmation or additional details. We'll re-analyze once you respond.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.CyrilleJsmt commentedon Jul 10, 2026
The Event OnAfterSelectReportLayoutUI must be call BEFORE a RUNMODAL report. Whereas I want to modify my layout AFTER the runmodal. With the old "Custom Report Layout" method, the OnFetchReportLayoutByCode event handled this very well !
I need a FetchReportLayoutUI event that works with the new "Report Layout List" method, as I explained just above.
Since you do not understand my request, I will phrase it more simply: how do I modify a report's layout using AL code once the report has been launched ?
github-actions commentedon Jul 10, 2026
Hi CyrilleJsmt,
Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.
📚 Extensibility Guidelines
Missing Information:
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.CyrilleJsmt commentedon Aug 3, 2026
proposed_code_change: CU codeunit 2000000005 "Reporting Triggers"
// After runmodal report and before printing, in option report, fetching a new layout Name by AL code.
///
/// Business event that allows layout selection through a user interface, primarily used by the "Report Layouts" extension.
///
/// The ID of the report object.
/// The name of the selected layout.
/// The GUID of the app that provides the layout.
/// Indicates whether the layout selection was successful.
///
/// This event enables UI-based layout selection and is primarily used by the first-party "Report Layouts" extension to provide a user-friendly layout selection experience.
///
[BusinessEvent(false)]
procedure FetchReportLayoutUI(ObjectId: Integer; var LayoutName: Text; var LayoutAppID: Guid; var Success: Boolean)
begin
end;
github-actions commentedon Aug 3, 2026
Hi CyrilleJsmt,
Thank you for your extensibility request. To help us process it efficiently, please update the issue to include the required information.
📚 Extensibility Guidelines
Missing Information:
Please update the issue with the missing details. We'll automatically re-analyze once updated.
Note
Automatically generated by the Triage Agent — advisory only. An engineer will review before any action is taken.
Tip
Not accurate? Reply with
/not-accurate(optional: add a short explanation). Your feedback improves future responses.CyrilleJsmt commentedon Aug 27, 2026
/not-accurate I've already suggested a code
github-actions commentedon Aug 27, 2026
✅ Feedback recorded
Thanks — your
/not-accuratefeedback has been logged and will be reviewed.AleksandricMarko commentedon Oct 12, 2026
Hello CyrilleJsmt,
Would it be suitable for your scenario if we add a new event, OnAfterGetSelectedReportLayout , in the SelectReportLayoutCode procedure of codeunit 44 Report Management ?
The event would be called after the current layout has been resolved but before it is returned to the reporting runtime:
The new event would be:
This would allow subscribers to replace both the layout name and its application ID during late layout resolution and would support layouts from the new Report Layout List flow.
AleksandricMarko commentedon Oct 16, 2026
As this repo will be archived in few days, I will close the issue. In case you still need proper event request, please create new issue as part of BCApps repo (https://github.com/microsoft/BCApps/issues)