web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Infinite recursive loop error in AL

(0) ShareShare
ReportReport
Posted on by 481

I am facing a recursive loop when I try to use Report.SaveAs() in a report extension. I understand that Report.SaveAs() runs the report again which is what causes the loop to occur.

My goal is to automatically email the report as a pdf to the associated customer after they run the report. How do I get past this if I can't call Report.SaveAs() OnPostReport? Where can I call Report.SaveAs() so that I can still send it to the same customer that ran the report?

Thanks,

I have the same question (0)
  • Suggested answer
    Brad_P Profile Picture
    1,549 on at

    Without knowing the specifics of the report - you can wrap the report in code that calls the "report for print" and the "report for saving." You can RunRequestPage to get the parameters for the report.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans