function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
abcd1234abcd1234 

explicit 'COMMIT'

Hi,

 

How to have an explicit 'COMMIT' in Apex?

 

In before update trigger we need to check a condition, and if that condition is satisfied the value of a field has to be changed and an error has to be thrown. As the transaction will be commited in the last, the changes to the field are not being saved as an error will be thrown.Hence a mechanism to commit the change to field before throwing the error. Is there any such mechanism in Apex.

 

 

BomanBoman

Nope! Cannot explicitly commit.