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...
Unanswered

Test Codeunit - Issue with RequestPageHandler

(0) ShareShare
ReportReport
Posted on by 71
Hi all,
I'm currently working on developping test codeunits for my company to test out our processes.
I'm having an issue while testing the Copy documents function available on the page Sales Credit Memo, as when I'm invoking the Copy document action, I consistently get the error /An error occured an the transaction is stopped. Contact your administrator or your partner to get help/ when reaching the RunModal of the report. 


I have a RequestPageHandler set up to catch this report (here we use a report of ours), and the RequestPageHandler is listed in my HandlerFunctions. I've used RequestPageHandler before and had no issues. When using the Copy document action on the page as a user I have no issue.



Has anyone ran into this kind of issue before ? 

Thanks

 
  • JS-27040927-0 Profile Picture
    22 on at
    Hello Valentine!
     
    I'm encountering the same error message when developing test codeunits.
    For me the error occurs when calling Codeunit.Run(). This specific OnRun trigger works fine when called during normal execution, but throws an error every time when it's run from a test codeunit.
     
    Have you solved your error? If so, what did you do to fix it?
     
    BR

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 740 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 570 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 291 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans