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 :
Finance | Project Operations, Human Resources, ...
Answered

How to get the warning in try, catch

(1) ShareShare
ReportReport
Posted on by 230
Hi Team,
 
I am following the below link code.
 
In case if there are any error or warning i want loop should go in catch.
 
Currently in journalCheckPost.runOperation(); i am getting some warning message and loop is running for next record. 
 
And i want if there are any warning message loop should go into catch instead of going next record.
 
Regards,
Mohan
  • Verified answer
    Martin Dráb Profile Picture
    241,656 Most Valuable Professional on at
    Your descriptions sounds like that there is no unhandled exception to catch. Either there is no exception at all, or it's already handled. I guess that there really isn't any exception, just a warning message added to infolog.
     
    Start by looking at the place where the warning message is added to infolog and then look whether it's called from. If you find that it's a validation in runCheck(), you can simply use parmThrowCheckFailed() to instruct ProdJournalCheckPost to thrown an exception. Or you can look at the result (parmCheckJournalResult()) and break the loop, without having to deal with exceptions at all.
  • CU21091228-0 Profile Picture
    230 on at
    Thanks Martin,
     
    It's resolved by using below code.
    JournalCheckPost.parmCheckJournalResult();
     

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

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 245 Super User 2026 Season 2

#2
Aayush Tiwari Profile Picture

Aayush Tiwari 227

#3
Subra Profile Picture

Subra 184 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans