reverseTxnsAsync Method @beta
Reverse (undo) the most recent operation(s) to the briefcase in the current session. By default, this method also abandons the locks that were acquired for those operations.
reverseTxnsAsync(numOperations: number, args?: ReverseTxnArgs): Promise<void>
@note This method will also abandon locks associated with any later, reversed Txns, if they have not already been abandoned. For example, if a call to reverseTxns reverses Txn 2 without abandoning its locks, and then this method is called to reverse Txn 1, it will abandon the locks associated with both Txn 1 and Txn 2.
@note If you do not want to abandon any locks, set ReverseTxnArgs.retainLocks to true.
@note If there are any outstanding uncommitted changes, they are reversed.
@note The term "operation" is used rather than Txn, since multiple Txns can be grouped together via beginMultiTxnOperation. So, even if numOperations is 1, multiple Txns may be reversed if they were grouped together when they were made.
@note If numOperations is too large only the operations are reversible are reversed.
@returns A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
| Parameter | Type | Description |
|---|---|---|
| numOperations | number | the number of operations to reverse. If this is greater than 1, the entire set of operations will be reinstated together when/if ReinstateTxn is called. |
| args | ReverseTxnArgs | Optional arguments to control the behavior of the reverse operation, such as whether to retain locks. |
Returns - Promise
A Promise that resolves to success if the transactions were reversed, or rejects with an IModelError otherwise.
Defined in
- core/frontend/src/BriefcaseTxns.ts Line 302
Last Updated: 22 April, 2026