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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
André Arnaud de Cal... 509 Super User 2026 Season 1
Giorgio Bonacorsi 375
Adis 268 Super User 2026 Season 1