I am trying to set up a Process in Process Builder to start when new leads are added (or existing leads are updated with the criteria below) that have a specific campaign ID populated (using campaign ID 18 characters) and custom field date of today (current day lead is uploaded). This is an external list. However the process is running on ALL leads new and modified with and without the following criteria it should only start when both of these are true on the Lead. enter image description here

The error message on these is: Error element myDecision (FlowDecision). The flow failed to access the value for myVariable_current.Campaign_Name__r.Id because it hasn't been set or assigned.

But these Leads are not even part of the campaign. The process is set for when all conditions are set and Do you want to execute the actions only when specified changes are made to the record - Yes. Thank you for assistance with this!

1 Answer 1


So, Process Builder is trying to see if the DML'd Lead meets these criteria

  • Lead.Campaign_Name__r.Id not equal null AND
  • Lead.X5_Tou... = TODAY

You need to do the following to avoid traversing a lookup relationship that is not populated:

  • Lead.Campaign_Name__c not equal null AND
  • Lead.X5_Tou... = TODAY

Lead.Campaign_Name__c is the foreign key field on the Lead and it will always be available to any PB evaluation on Lead - but if null, the relationship to the parent record Campaign_Name__c doesn't exist and hence Campaign_name__r.Id can't be resolved (and PB blows up)

Lead.Campaign_Name__c is by definition the same as Lead.Campaign_Name__r.Id if and only if the value of Lead.Campaign_Name__c is non-null

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .