function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
arvinarvin 

Update look-up field through workflow - reg.

Hi friends,

Is there any way to update a lookup field through workflow rules ?

 

Regards,

Arvin.

Best Answer chosen by Admin (Salesforce Developers) 
MarkSilberMarkSilber
My bad -- you can only change the Owner and Record Type of an object via Workflow -- which are indeed lookup values but a specific type. Your only option would be to develop a trigger that changes the relationship.

All Answers

MarkSilberMarkSilber
You can set a lookup field via a workflow, but there are limitations. For example, you can't change the parent of a detail record. The other limitation is that you can't set the new value as part of a formula, only directly. You would have to select the new relationship value via the lookup function in the Field Update -- it can't be dynamic. This works if you only have a few relationships that would be changed via workflow -- but it would be very difficult if you had a bunch of different values that would need to be set.
arvinarvin

Hi Mark,

Thanks for ur suggestion. Can you pls explain me how to create a look-up field through workflow ?

MarkSilberMarkSilber
My bad -- you can only change the Owner and Record Type of an object via Workflow -- which are indeed lookup values but a specific type. Your only option would be to develop a trigger that changes the relationship.
This was selected as the best answer