Update Fields Using Object Workflows

A field update is an event action that you configure when creating an object workflow. When you configure more than one event action apart from configuring field updates, field updates always run first, and then other event actions are run in no specific order.

Note: The field update invoked from Object Workflow is a background update by a web service. If this update is performed while a record is open and you're making other updates, you get an error stating that the record has already been modified. This might also happen if you have multiple object workflows that are trying to update the same field on an object.If this happens, exit the record, reopen it, and reenter your updates. But to avoid this situation in the first place, avoid creating multiple object workflows that update the same object. Instead, consider if a synchronous object-level or field trigger, or validation rule, could achieve the same result without sacrificing performance.

Here's a summary of how to configure field updates as part of object workflows:

  1. From the Application Composer overview page, select Object Workflows.

  2. Select Actions > Create.

  3. Select an Object and provide a meaningful Name for the workflow.

  4. Define the trigger condition for the workflow.

    Note: When defining the condition, ensure your Groovy script eliminates the repeated execution of this workflow.
  5. Select the Field Updates event action.

  6. On the Create Action: Field Updates page, provide a Name for the field updates action.

  7. Specify the field to update and the new field value once the workflow is triggered. Use the Update More Fields option to select additional fields to update. See Configure Object Workflows for an example of how to configure field updates.

Note: If you have a record open and a workflow is triggered on a field in that record, you must exit from the record and reopen it to see the updates.

Specify Display Sequence for Fixed Choice Lists

In a fixed choice list, the list of field values can be either alphabetically arranged or have a display sequence such as High, Medium, or Low. When updating a fixed choice list field that has a display sequence, specify whether you want to populate the field with the next value, or with the previous value, in the list.

For example, for a display sequence of High, Medium, and Low, you can change from High to Medium (populate with next value) or from Low to Medium (populate with previous value) during a field update. However, if the current value is Low and you configure using populate with next value in list, the field isn't updated because Low is already the last value in the sequence.

Support for Primary and Child Objects

You can configure field updates using either a parent or a child object. When you select a child object when defining an object workflow, you can update fields only in the records of that child object; you can't update fields in the records of that child object's parent.

For example, when defining a workflow for Opportunity Team, which is a child object of Opportunity, you can configure field updates when a new team member (child record) is added to the Opportunity Team, but you can't configure field updates for records in the parent Opportunity object.

Additionally, when inserting field tokens while configuring field updates, only those tokens belonging to the selected child object is available for selection. See the Configure Object Workflows topic for an example of how to insert tokens when configuring field updates.

Object Workflows vs. Triggers

Object workflows are asynchronous. Use object workflows and the Field Updates action only when you need to update a field asynchronously, such as based on a time delay.

If you want changes to be immediately reflected on the user interface at runtime, however, use scripting and triggers, such as the Before Update trigger.