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
FabienneFabienne 

Process builder generating an error

Hi all,
I created a flow and it's being triggered using process builder. I added a criteria for running the flow but, it's bypassing the criteria and attempting to trigger the flow anyway, could someone help my understand why that is?

1. Process to check if lead has been assigned to campaign
User-added image


2. Triggering  flow only when campaign id is not Null

User-added image


3. If campaign id is not null, pass on the camapign id and lead id to flow variables

User-added image

Error:
An error occurred at element myDecision (FlowDecision).
The flow failed to access the value for myVariable_current.CampaignLeadID__r.Id because it hasn't been set or assigned.


I understand that this error is occuring at a flow element but my question is, why is it even getting to that point. I am getting the error when I try to add a new lead with NO campaign id assigned to it. 

I appreicate your help in advance!
 
pkpnairpkpnair
From the screen shots above it is not totally clear if the criteria is checking CampainLeadID or not. I can see only "Campaign.." in the screen shot 2. Could you please verify the variable name once again?
FabienneFabienne
Thank you for your reply, the campaign id is [Lead].CampaignLeadID__c.Id
pkpnairpkpnair
If you are refering to a look up relationship from Lead to Campaign, I would image the format you should choose will be [Lead].CampaignID
pkpnairpkpnair
You seem to be refering one level deeper. Check the variable selection in the process builder
pkpnairpkpnair
did you sort this out?
FabienneFabienne
Yes I somehow fixed the issue. I basically wanted to check if a lead has been added to a campaign but when i used isnull function to check if camapign id on lead record is null or not, the flow generated an error, so i created a text formulas on lead record and set it equal to campaign id.I then used isnull function the the formlas field instead and the flow ran successfully.

Thank you for your help!