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!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans