Process Builder - Update Lookup field from formula/text field? - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Andrew HeidrichAndrew Heidrich 

Process Builder - Update Lookup field from formula/text field?

Hi - In Process Builder, I'm attempting to update a lookup field based on a value in a formula field.

There is a lookup relationship from Object A to Object B.  Object A has a formula that populates one of 17 different 18-digit IDs from Object B based on what is chosen in a particular picklist on Object A.  I want to populate the lookup to Object B with that formula's result.

No matter what I try, the formula field will not show up as an available field to update the lookup field - only actual ID/lookup fields are showing up as options to update the lookup field.  I've also tried committing the formula value to a regular text field via field update, but even the 18-digit text field is not selectable when using Process Builder to update the field - it seems it only allows lookups to be populated by other lookups.

Does anybody have any suggestions?  Thanks.
Best Answer chosen by Andrew Heidrich
adam marksadam marks
For now that is still a limitation with declarative workflow or process builder. An ID field can either be hardcoded or matched against another ID field to accept its value. A trigger/Apex class can get around this but obviously you need code in order to make that work. 

All Answers

adam marksadam marks
For now that is still a limitation with declarative workflow or process builder. An ID field can either be hardcoded or matched against another ID field to accept its value. A trigger/Apex class can get around this but obviously you need code in order to make that work. 
This was selected as the best answer
Andrew HeidrichAndrew Heidrich
Thanks, Adam.  Was afraid of that :-)  Wound up just building a Process Builder Process with the 17 different criterion.
Jacqueline ParedesJacqueline Paredes
My question is similar; however, I am trying to take the record ID from a Lookup(Contact) field on Account (named Primary_Contact__c) to automatically populate an Event's Name ID when a particular workflow creates an appointment that should be associated with that Contact: 
User-added image 
Notice that the two other Lookup(Contact) fields (LeadReferralContact__c, Realtor_Mgmt__c) do show up in my Process Builder options to "Select a Field," just not the one I want!  Help?
User-added image
Matt BlanskiMatt Blanski
I have an issue similar to that of Jacqueline's. A custom ID field I just added is not showing up in process builder to be referenced either.
Jerry ReidJerry Reid
Hmmm...I'm not sure if this is still a limitation with the process builder, but an alternative solution is to use the app Lookup Helper (https://appexchange.salesforce.com/listingDetail?listingId=a0N30000009wj3REAQ) to automatically set your lookups based on matching field/ID/text values whether from a formula field or other field type.
Hugh WheelerHugh Wheeler
Hi,

I just had a similar problem and found that Lookups dont appear in process builder field references of formulas unles they are required.  Once I checked the box on the custom lookup field to make it required, I could choose the field through process builder.

Hugh
Alexis de Saint PaulAlexis de Saint Paul
Hi.
If you just created your custom field, I realized it doesn't appear immediately on the process builder page. Leave your page, refresh and come back again. The new fields should appear. I'm hoping they'll put the possibility of matching ID fields with formulas in next Release, it would allow a lot of new actions with this tool.
Simon BairdSimon Baird
Hi Andrew, I managed to achieve this using a formula in the lookup referencing the 18 digit record ID stored in a text field. Hope this helps!
Mutahhar KhanMutahhar Khan
Hi Simon, 

Can you share how you were able to achieve this from declarative formula.
I need to assign the lookup field with the id that is stored in Text field ( via process builder).

Thanks !!
Craig RickerCraig Ricker
@Simon Baird
Hey Simon, can you share how you were able to set a Lookup field in process builder using a value stored in a formula text field?
Neil HatchNeil Hatch
Simon Baird,

It seems your solutin is in hot demand! Can you shre how you got this to work?