Referencing Old Record Values in a Workflow

Even when a workflow changes a record's values, it's possible to create workflow initiation, action, or transition conditions that reference record values before the changes occurred. The record's original values are retrieved before the first Before Submit event executes. These values can then be used in Before Submit and After Submit workflow, action, and transition conditions. To do this, use the Old Record option in Record field when defining a condition using the Condition Builder. For more information, see Defining a Condition with the Condition Builder.

A screenshot showing "Old Record" being selected in the Record column.

Old Record Guidelines

Use the following guidelines when using Old Record values for a record.

Example of Reacting to a Change in a Field

A common use case for referencing old values in a workflow is reacting to a change in a field on a record. In this situation, you would create a condition similar to Old Record.Some Field != Some Field.

For example, consider a task record that is running an approval workflow. To expedite the approval, a user can set the Priority field to High and the workflow can be configured to react to this field's value. To notify the approver, we can use the Old record option and send an email to the approver only when the Priority is raised to High or set to High when the task record was created. To do this, you create a Send Email action with a condition using the Priority field.

To create the example Send Email action:

  1. Select an existing workflow flow state or add a new workflow state to the workflow.

  2. Click New Action in the Context Panel.

  3. Click Send Email.

  4. Set the following action properties:

    • Trigger On – After Record Submit

    • Condition:

      Custom Formula – Selected

      Condition{old.priority.id} != {‌priority.id} and {‌priority.id} = 'HIGH'

    • Sender:

      • Specific Sender – Selected

      • Sender – Specify a sender

    • Recipient

      • From Field – Selected

      • Record (Join Field) – Current Record

      • Field – Assigned

    • Content

      • Custom – Selected

      • Subject – Your task has been escalated!

      • Body – Your task ‘{title}’ has been escalated to High priority!

  5. Click Save.

Note:

It is also possible to create the condition's formula using the Visual Builder. In this example, the formula would be Old Record : Priority (Task/Call) != Priority (Task/Call) And Priority (Task/Call) = High.

Related Topics

General Notices