I'm sure that many Salesforce admin already encountered the this Process builder error when building automation referencing a field on a related record (aka lookup field): 'The flow failed to access the value because it hasn't been set or assigned' and came across this Salesforce document.
However, it does not help in case of referencing a User lookup field.
-------------------------------
Use case: when a lead's ownership is transferred to another user, respective fields are updated based on their profile.
Error element myDecision (FlowDecision).
The flow failed to access the value for myVariable_current.Owner:User.ProfileId
because it hasn't been set or assigned.
---------------------------
Workaround:
Have a condition to check if the record is assigned to a user or a queue before checking their profile id for respective actions.
- Records owned by user: BEGINS([Lead].OwnerId, "005")
- Records owned by queue: BEGINS([Lead].OwnerId, "00G")
Apply to my Process builder:
Comments
Post a Comment