Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

Test Codeunit - Issue with RequestPageHandler

Posted on by 69
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

 
Categories:
  • Community member Profile Picture
    Community member 10 on at
    Test Codeunit - Issue with RequestPageHandler
    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans