RollbackTrans()
Rolls back a transaction initiated by BeginTrans().
Use this method to prevent dead locking when using table level scripts. Exercise extreme caution when using this method because all transactions must be closed properly. Use the coding practice shown in the example below.
Parameters
None
Examples
var updatequery;
updatequery = CRM.CreateQueryObj(sql);
try
{
updatequery.BeginTrans();
updatequery.ExecSql();
updatequery.CommitTrans();
}
catch(ex)
{
updatequery.RollbackTrans();
}