microsoft / microsoft/BCApps

[Event Request] Add OnFetchReportLayoutByCode event

Open
#10,708 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

missing-info Team: Integrations
Dominant language
AL
Stars
683
Forks
459
Avg merge
3d 26m
Merged PRs (30d)
633

Description

Describe the issue

CU codeunit 2000000005 "Reporting Triggers"

Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.