Hello Friends,
Stop using the Error() function in Business Central.
A better approach when working with long processes, like posting, is to use these codeunits:
- "Error Message Handler".
- "Error Message Management".
They allow to log every error in a process and show them at the end.
Benefits.
1) Modern error.
It’s not just an error message. It can show related records to the error and add recommended actions.
2) Different message types.
You can show errors, warnings, messages, testfields, fielderrors, and more.
3) List of errors.
By showing a list of errors at the end, users don’t have to fix them one at a time.
Have a look at the base app for more examples:
Sales Header → SendToPosting
E-Invoice Mgt. → CheckSalesDocument
PS. Did you know about this approach?
No comments:
Post a Comment