Notifications
Announcements
No record found.
Hi,I have a requirement where, on a clicked method, i have an if condition applied and if the condition is true, it should stop the flow and just show the error message. The code used was : Throw error("The condition failed"); After debugging, it is going in the if condition and also it is successfully displaying the error, but it is not stopping the flow. The action is being executed. I want to stop the flow/Action from being executed. Is there any other command I should be using?
Hi,
Please share more info/screenshots on this so that we can see what's going on. Using the "throw error" statement usually stop the process flow but there could be valid reasons why it's continueing. E.g. check if the code is within error handling (try.. catch statement), or perhaps it's within nested error handling.
X++ exception handling
learn.microsoft.com/.../xpp-exceptions
Just put your logic when the error doesn't occur. I mean in if check if it is success and write your logic and in else write failing logic like throw error. So if it fails then it will throw error.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 456 Super User 2025 Season 2
Martin Dráb 429 Most Valuable Professional
BillurSamdancioglu 239 Most Valuable Professional