1

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.

PB Criteria Most Recent Campaign Criteria

Create Follow Up Task Follow Up Task

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?

4
  • Have you tried using ISBLANK() instead of ISNULL() 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) – Derek F Oct 11 '16 at 19:16
  • I"ll try using ISBLANK(), but I'm almost positive I was getting the same error with that. Also, this cannot be done with Workflows, as you cannot customize the name of the Subject... so it's either Process Builder or Trigger/Apex. – Chris Powers Oct 11 '16 at 19:25
  • Wow, ISBLANK() worked perfectly. I guess the first time I tried it, I didn't have all the other criteria set properly. Thanks, @DerekF. – Chris Powers Oct 11 '16 at 19:34
  • Glad it worked, I'll type up a quick answer so that other people that stumble across this know that the question has 1) been answered and 2) the answer works. – Derek F Oct 11 '16 at 20:08
1

Salesforce has deprecated the ISNULL() formula function. I can't find an exact date on it, but it was deprecated at least 6 years ago.

Instead, try using ISBLANK(). It can be used everywhere that ISNULL() is used.

Process Builder is...quirky (to put it charitably), so this may be enough to get things working as you expect. There is also some precedent for switching to ISBLANK() being the solution (look at Gail Flowers' comment on 2016-10-6, the bottom one at time of writing)

1
  • Yeah, I've worked with Process Builder quite a bit, so I know what you mean in terms of the quirkiness. I just overlooked the ISNULL thing even though I knew it was deprecated. Appreciate the reminder and word of caution. – Chris Powers Oct 11 '16 at 20:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.