[Event Request] Add OnFetchReportLayoutByCode event
Nobody has claimed this yet.
- Dominant language
- AL
- Stars
- 683
- Forks
- 459
- Avg merge
- 3d 26m
- Merged PRs (30d)
- 633
Description
Describe the issue
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;
Expected behavior
In CU44, there's a "FetchReportLayoutByCode" function to modify the layout before printing but after a runmodal but use with the old "Custom Report Layout".
With the new method (Report Layout List 2000000234), it is currently not possible to create an "OnFetchReportLayoutByCode" event to modify the layout state before printing but after a RunModal.
Steps to reproduce
Modify the layout state before printing but after a RunModal.
Additional context
An OnAfterSelectReportLayoutUI event exists, but it must be called BEFORE a report is executed via RUNMODAL, whereas I want to modify the layout AFTER that call. With the old "Custom Report Layout" method, the OnFetchReportLayoutByCode event handled this perfectly!
I will provide a fix for a bug
- I will provide a fix for a bug
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by examining CU44's FetchReportLayoutByCode function and the reporting triggers in CU 2000000005, then compare them with the Report Layout List object 2000000234 and the existing OnAfterSelectReportLayoutUI event. Confirm where layout selection occurs after RUNMODAL and before printing. Done means the requested event can modify the selected layout state at that point without relying on the old Custom Report Layout method.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100