I'm running into issues using Process Builder to solve for the following business scenario: Marketing wants to automatically create a Task when a Lead is updated and an association is made to a Campaign via custom field called "Most Recent Campaign". They don't want a Task created if the lead is new, only when it's edited. Also, the Subject of the Task should be based on the Campaign Type of the Most Recent Campaign association.
The PB that I built works in all "positive" scenarios (when it's edited and not new, when Most Recent Campaign was previously null and now it's populated, and when Most Recent Campaign is changed to another value), except when a value was previously populated in Most Recent Campaign and it is updated to be null.
Subject Logic
IF(
ISPICKVAL([Lead].New_Campaign__c.Type, "White Paper/Case Study"),
"Note: White Paper/Case Study download",
IF(
ISPICKVAL([Lead].New_Campaign__c.Type, "Trade show"),
"Note: Trade show registration",
IF(
ISPICKVAL([Lead].New_Campaign__c.Type, "Contact Us/Request a Demo"),
"Follow up: Contact Us/Request a Demo submission",
IF(
ISPICKVAL([Lead].New_Campaign__c.Type, "Webinar"),
"Note: Webinar registration",
IF(
ISPICKVAL([Lead].New_Campaign__c.Type, "Event/Seminar"),
"Note: Event/Seminar registration",
IF(
ISPICKVAL([Lead].New_Campaign__c.Type, "Business Developement/Partner"),
"Follow up: Business Development/Partner form submission",
""
)
)
)
)
)
)
The error I get in the Flow email is "The flow failed to access the value for myVariable_current.New_Campaign__c.Type because it hasn't been set or assigned."
I don't understand why the flow is getting to the action because it should't satisfy the criteria (i.e. Most Recent Campaign is null), which means nothing should happen (stopped/abandoned PB). Can someone shed some light on this?
ISBLANK()
instead ofISNULL()
in your criteria formula?ISNULL()
is deprecated, so it should be avoided. I might also suggest turning this into a workflow rule instead of using a process (Process Builder has some rather serious quirks to it)