Blog Layout

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

Mike Arthur • Jun 15, 2017

Be sure that the API name of fields in formulae are written with the correct case!

I was building a Process Builder so that if a field on one object is updated, the corresponding field on another object is updated with the same value. Another PB operates in the opposite direction to keep these fields in sync.

The (pre-existing) fields were Object1__c.Custom_Type__c and Object2__c.Custom_type__c.

The PB to update Object1 when Object2 is changed kept failing with 'The flow failed to access the value for myVariable_current.Custom_Type__c'.

I tried many ways of ensuring that Custom_Type__c was not blank before checking ISCHANGED(Custom_Type__c), which is one of the most common causes of this error.

However, I then noticed that the error was reporting on field Custom_Type__c, whilst the actual field API name is Custom_type__c. I amended my formula in PB to Custom_type__c and all is good.

So PB will let you create a formula using a valid API name but with incorrect case, but will then fail at runtime. Nice!

My Blog of Salesforce Stuff

by Mike Arthur 16 Oct, 2021
'XHR Failed' error when trying to install VS Code extension
by Mike Arthur 09 Jun, 2020
What is $A (dollar A) in Lightning Aura component framework? Is it a global variable? Where are the docs for $A?
by Mike Arthur 08 May, 2020
Authorise a Salesforce Connected App using OAuth 2.0 JWT Bearer Flow
by Mike Arthur 26 Apr, 2020
REST API Connection to Salesforce Connected App Using OAuth 2.0 Authentication from Postman
by Mike Arthur 23 Mar, 2020
How to create a Lightning tab menu with dropdown sub-menu
by Mike Arthur 27 Nov, 2018
How to show a month by month trend chart with multiple years on same chart
by Mike Arthur 06 Nov, 2018
What to do if you receive emails about expiring certificates
22 Aug, 2018
Process json strings when working with integrations
by Mike Arthur 22 Aug, 2018
If you're switching email accounts you can copy appointments from one calendar to the other
by Mike Arthur 22 Aug, 2018
When you search in Outlook 2016, how do you see in which folder you filed an email in the results?
More posts
Share by: