CU 7307 SuppressCommit functionality
for external use we need an enhancement of Codeunit 7307 to avoid COMMIT. We Need a global variable, which can be set via Event.
- New global variable SuppressCommit (Boolean)
- New Event OnAfterModify(VAR SuppressCommit)
- Perform commit depending on new variable SuppressCommit)
Hi,
we do not want to provide an event that allows you to set the SuppressCommit variable. If you look in Codeunit 80 you will see that we have a SetSuppressCommit function which you can call to set the value. The events only pass along the value, they do not allow you to change it. This is by design. In order to use SuppressCommit you have to create a variable for the codeunit and from then on you take responsibility for suppressing the commit or not. The reason we do not want to provide this capability through an event is because it would allow any extension to change the behavior without anyone being able to control it. We do not want to randomize when a COMMIT is run or not. With the current design, you explicitly take control (and responsibility) for what happens.
Please let us know if you can refactor your code to use SuppressCommit in this way in which case we can add the SetSuppressCommit to the codeunit(s).
br/Gert
Hi, then it would be perfect, if a new function will be available to set the global variable and not an event. Thank you so much.
Best regards, Kathrin
Hi,
we will add it to our backlog. We’re entering the endgame for the Spring ’19 release and we need to focus on finishing up so unfortunately I cannot promise what update this will ship in.
br/Gert
Hi, Are there new insights here? Thanks in advance, best regards, Kathrin
Hi, this request is in the backlog (200+ active items). We are going to implement them in 1-2 weeks. Stan.
This is implemented in master on May 14 and will be available in next major update