Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Business Central forum

OnAfterSubstituteReport works only on static methods?

(0) ShareShare
ReportReport
Posted on by 105

Hello Guys,

I have a question about new event OnAfterSubstituteReport in codeunit 44. According to the Microsoft:

Substitution is possible whenever a report is invoked as the result of the user activating a page action that has the RunObject property set to a report or a report is invoked through one of the following static methods on the Report data type.

Therefore any kind of report invocation not like REPORT.RUNMODAL, but when the report was initiated as a variable such as CopySalesDoc on Sales Invoice wont' work:

CopySalesDoc.SetSalesHeader(Rec);
CopySalesDoc.RUNMODAL;
CLEAR(CopySalesDoc);

Does Microsoft plan to change it in the future?

Mat

Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans