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
Yao Lin 8Yao Lin 8 

The flow couldn't find the <SObject Variable> resource.


I created a button in an object. When I click the button, it will trigger a flow. I successfully tested it in Sandbox. However, when I pushed it to Prodcution, I received a messgae: The flow couldn't find the SO_Reocrd resource. SO_Record in this case is a SOBJECT VARAIABLE. Please note, I haven't received any errror messages through emails. It was diplayed on a new page. Any idea how to resolve the issue? 

Ilya YefremovIlya Yefremov

I fixed same issue in this way:

I had Fast Lookup that doesnt find the record and assigns null value to sObject variable, when this happens it is still ok, but when in the next step in your flow you will try to retrieve some field from this sObj - this error will occur (basically you trying to get field from null). I retrieved record and in the next step tryed to check if retrievedRecord.Id equals null true - and it failed cause Fast Lookup equaled null to whole sObj var. So I changed my condition to retrievedRecord.Id equals null true and it worked fine. So if you try to get field from sObj var which value is null - you will recieve this error.

Clayton GossClayton Goss
I ran into a similar issue when I was passing the recordId from the button into the flow.  It turns out the button was passing the 18-character ID but the GetRecords resource only accepted the 15-character ID.  I created a formula and assignment step to truncate the last 3 digits and it worked fine.