sessionRevision()
Returns the base revision of the current session. This is the revision on which the current session is based and which defines the state of all objects at the start of the current interaction/transaction.
This function has no parameters.
Type: Revision
The revision on which the current session is based and which defines the initial state of the objects in this session.
sessionRevision()
Output:
| Revision | Revision date | Author |
|---|---|---|
| 32 | 29.09.2025, 10:40:15 | Great, Administrator |
Returns the base revision of the current session.
{
// Assuming $order has the status “Processing” in the base revision.
// The status is changed in the current transaction.
$order.set(`xxx:xxx#status`, "Canceled");
currentStatus = $order.get(`xxx:xxx#status`);
previousStatus = $order.inRevision(sessionRevision()).get(`xxx:xxx#status`);
"Before: " + $previousStatus + ", After: " + $currentStatus
}
Output:
Before: Processing, After: Canceled