Tags

,

It has been a long time:), let me share few posts on Process Builder and Flows which I have been using them recently.

Requirement:

Need to update a lookup field in an object. We have a Location field as a lookup in a custom object(say Rate Card). This should get populated from Account’s location when a new rate card is created. Account is a lookup field in the Rate Card and it is a required field.

Analysis:

Earlier, the requirement could only be achieved through APEX code as we cannot use Workflow Field update for lookup fields, but with the introduction of Process Builder, it is possible to update lookup field through Process flow. Wow, it’s a boon for developers:)

Solution:

Create a process as per the screenshot below:

Create Process

The process will be executed upon Rate Card record creation.

Check if Location field is empty and if so, update it:

Screen Shot 2015-08-15 at 12.32.18 pm

Create an Immediate action to update the Location field:

Update Location

Note the value, we have taken Rate Card’s account’s location and updated in Location field of Rate Card.

There is a salesforce article on How to auto populate Look up Field using Process Builder

Limitation: You cannot Update Lookup field from formula/text field

Please let me know for any comments/clarification.

P.S: It is possible to update lookup field using Visual flow. Please find the screenshot below which shows account id update(account is a lookup field in Opportunity object) in Record update step in Visual flow.

visual-flow-update

Visual flow update