• About
  • Contact me!

Salesforce Everywhere

~ Blog on Salesforce Dev and admin stuff

Salesforce Everywhere

Tag Archives: update lookup fields

Update lookup field using Process Flow

15 Saturday Aug 2015

Posted by Mani in Process Builder

≈ 4 Comments

Tags

Lookup fields, update lookup fields

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

Blog Stats

  • 144,702 hits

Archives

Recent Posts: Salesforce Everywhere

Einstein GPT

How to get field values on onLoad in lightning-record-edit-form in LWC?

Using Dynamic Actions

How to check if the logged in user is a Guest user or not in APEX class?

How to Close Quick action in LWC

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Enter your email address and click on Follow us (below) to follow this blog and receive notifications of new posts by email.

Website Powered by WordPress.com.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • Salesforce Everywhere
    • Already have a WordPress.com account? Log in now.
    • Salesforce Everywhere
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar