Time for BCFridayTips for the BC consultants.
Be careful with the hidden Commit!
When a Commit statement is executed, it ends the current write transaction and registers the changes in the database. If an error occurs after the Commit, those changes won’t be rolled back, potentially leading to a partial commit issue.
Here’s an example:
Consider the table 99000786 “Routing Version” and its “Status” field validation.

In this code, a Commit is triggered when the Status field is validated.
We need to be aware of this.
Why?
Avoid partial commit. If an error occurs after a Commit, it is impossible to roll back everything completely.
Even though the commit statement isn’t used frequently, it’s important to check for it when working with any objects in BC so you can handle it accordingly.