[Event request] Codeunit 80 to disable COMMITs
To migrate a NAV ISV add-on to BC:
We need a way to disable COMMITs under certain scenarios when in non-preview mode. Could we get an event right before each COMMIT call that passes a variable we can set to bypass the commit if needed? For example:
IF NOT PreviewMode THEN BEGIN MODIFY; ProceedWithCommit := TRUE; //NEW OnBeforeCommit(ProceedWithCommit); //NEW IF ProceedWithCommit THEN //NEW COMMIT; END;
I realized we can accomplish this with no additional events.
Hi, this might be ok if your extension is the only one on the system. But other extensions might execute a COMMIT just about anywhere.
Currently any extension can subscribe to any event and add a COMMIT, just because they have a reason to do it.
br
Understood. In the event our product conflicts with another product, we will reach out to the other ISV vendor to work toward resolution.
True. And I think most ISV are at least aware of the issues. In our (my) opinion BC is still a long way before multiple serious extensions can be installed on the same system.
The problem is even if the vendor is willing to change an extension it might be days or even weeks before this change reaches the AppSource and before a fix can be applied.
In OnPrem installations it might be easier, but the issue with COMMITS will need to be refactored in the future ( imho ). At present, I think Microsoft should carefully examine any extensions that use either COMMIT or SuppressCommit, since this can completely screw things up and will probably require a lot of debugging to get right.
The issues with documents partially committed might crop up days, weeks or even months later. Most of the issues with additional COMMITS will not be noticed when the damage will be done, but most probably much later.
Sorry for the long post ( this is an issue that bothers us too ), br
100% agree on all your points.