Commit Transaction

Call the Commit Transaction system function to commit all the database operations started since the Begin Transaction call. Similar to Begin Transaction, this system function takes in a Transaction ID parameter. You can use the same variable as the one used in Begin Transaction system function.

EnterpriseOne will commit all database operations started between the Begin Transaction call and the Commit Transaction call. If the Commit Transaction fails, EnterpriseOne automatically rolls back the database operations so that none of the database operations will be committed. There is no need for Event Rules (ER) to call Rollback Transaction after Commit Transaction.

You need to carefully define the location of the Begin Transaction and Commit Transaction calls. The transaction boundary must be just big enough to include all relevant database operations and not too large that it blocks other code from accessing the same database records.

The example below shows how to use transaction processing through Event Rules:

// Start Example
Begin Transaction (transaction ID)
 
Table IO_Open Table 1
 
Table IO_Insert Table 1
 
Table IO_Open Table 2
 
Table IO_Open Table 2
 
Commit Transaction (transaction ID)
// End Example