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

Announcements

No record found.

News and Announcements icon
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,551 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,933 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,055 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 640 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans