Monday, December 3, 2012

Creating Workflow Action for updating a field in Force.com

One of the workflow actions that we can set up to execute in Force.com platform is 'Updating a Field'. Let us explore the steps involved in setting up this type of workflow action using Force.com platform.


From the App Setup -> Create -> Workflow & Approvals -> Field Updates, you can create new Field Update and use it while setting up workflow actions.

Otherwise, while setting up workflow actions you can click on 'New Field Update'. Both actions take you to the same page.


Enter Name for the Field Update you are setting up. If you had come into this page via the 1st route mentioned above, you will need to select the object to which this field update belongs to.  In the 2nd route, the object you have selected for the workflow rule is automatically selected for the action as well.

Field to Update need to be specified. Based on the data type of the field selected for update, you get different options for specifying new field value. 


  • If it is a nullable field type, you can specify a blank (null) value for the new field. 
  • You can use a formula to set the new value. For example Today() + 7 for a date field.
  • For Record Owners, you can choose the user for new assignment.
  • For a boolean (True/False) type of field, you can select True or False as new value.
  • Another type of field is 'Picklist' where possible values are predefined. If you are updating this type of field, you can set the value to one above or below the current choice or to a specific predefined value.

Re-evaluate Workflow Rules after Field Change checkbox allows you to re-evaluate all workflow rules on the object after the field value is updated and hence trigger any workflow rules if the criteria are met. 

Save your work. If you created a new field update, go ahead and associate it with a workflow rule and you will have a workflow action for updating a field.


Happy cloud computing using Salesforce!

No comments:

Post a Comment