Revision of the session
Syntax
sessionRevision()
Description
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.
Parameters
This function has no parameters.
Return value
Type: Revision
The revision on which the current session is based and which defines the initial state of the objects in this session.
Examples
Example 1
sessionRevision()
Output:
| Revision | Revision date | Author |
|---|---|---|
| 32 | 29.09.2025, 10:40:15 | Great, Administrator |
Returns the base revision of the current session.
Example 2
{
// 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