C/AL rollback without error

If you want to rollback the database changes, but do not want the code execution to end, simply call ASSERTERROR ERROR(”); The ERROR(”) will quietly rollback the data changes, and the ASSERTERROR will capture the error, allowing the code execution to continue.

Vjeko
Vjeko

Writes about Business Central, AL, and building software with agents. More on the About page.

Comments