2

So this is a really strange Process Builder bug that seems unavoidable, wondering if I'm missing anything.

I have a process with criteria that references the name of a related object:

[User_Account__c].Service_Profile.Name = "Admin"

The idea is that when the name of this object (related by lookup field) is set to "Admin", a record update will fire. Simple, right? Not really. When the record is updated this message is received:

"The flow failed to access the value for myVariable_current.Service_Profile__c.Name because it hasn't been set or assigned."

So, it acts like it is running before update, and doesn't have a value to reference. That would seem odd enough, since basic workflow rules could do this, and yet it gets stranger. If I change the criteria to reference an even further removed object:

[User_Account__c].Service_Profile.Service.Name

..then it fires and updates just fine. So clearly it has a value that it can access.

Now, I change the criteria yet again, to this:

AND( ISCHANGED([User_Account__c].Service_Profile__c), [User_Account__c].Service_Profile__c.Name = "Admin")

THEN the update will also fire, but if delete the value from Service_Profile__c and save, then I get the same "The flow failed to access the value for myVariable_current.Service_Profile__c.Name because it hasn't been set or assigned." message again!

Any idea what is going on? Thanks!

  • 2
    Welcome to SFSE; it is worth noting that you can use edit to make your question more readable - specifically, by using back quotes around code fragments (e.g. my code) to make them stand out. I did this for one of these so you can see how it is done – cropredy Oct 3 '16 at 21:14
1

Figured this out with some help eventually, the needed criteria looks like this:

AND(
      ISCHANGED([User_Account__c].Service_Profile__c),
      NOT(ISBLANK([User_Account__c].Service_Profile__c)),
      [User_Account__c].Service_Profile__c.Name = "Admin"
      )

Basically, needed to add some criteria that would stop the process from referencing [User_Account__c].Service_Profile__c.Name when [User_Account__c].Service_Profile__c was going to be null in the equivalent of Trigger.new.

  • Your org doesn't have any profiles named "Admin". – Dan Wooding Oct 11 '16 at 17:36
  • Ha, it's almost as if you have insider information about my org...then again the formula isn't referencing an actual profile now, is it? – number41 Oct 13 '16 at 2:12

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.