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
Craig WoodmanCraig Woodman 

Record Triggered flow - Task Object - $Record.Id variable is not accessible.

Ran into this last night in working a flow. I wonder if anyone else has run into it, or if it is a bug with Winter 2022.

A record triggered flow is triggered by a change in a bolean field named "Start Automated Process" to TRUE. Triggers whenever the record is updated and that field's value is TRUE.  The record triggered flow has two elements in it, first, sets bolean Start... field back to False, and then calls a subflow. The subflow's job is to set another field on the task object to a specific value based on computation within the flow (exact function not as important - it has been debugged and is working correctly) - this is done based on passing the $record.id variable to an input variable in the subflow.

When testing by changing the Start Automated Process field on the task object, upon save, the Start Automated Process field goes back to FALSE (as expected) meaning that the record triggered flow is being triggered, but the expected update on the task object does NOT occur.

So I attempted to debug the record triggered field, and this could be crucial, I received an error message saying "Object Task is not supported in UI API."

User-added image
Figuring that this was just for debugging, I was still puzzled that the subflow did NOT appear to be running at all and setting the other value.

To further debug, I set an element in the record triggered flow that will write the value for $Record.Id into an un-used text field on the task record. When I then triggered the flow by setting the Start Automated Process field to TRUE, the SAP field sets to FALSE as expected, but the $Record.id field does NOT set to the value of the record ID.

My conclusion at this point is that the $record.id field is NOT accessible in a record triggered flow. I attempted to assign the $Record.Id field to another declared variable, and had the same result.

I used Process builder to then set the SAP field on Task to false, using the same triggers that I used on the record triggered flow, and to then run the subflow.I set the SAP field on task to TRUE. Process builder launches correctly, setting the SAP field to false, and updated the other field correclty with the subflow called. Clearly, it was able to pass through the Task ID.

I attempted some more debuggiing using the field on task $Record.CallType - and using the record triggered flow, the record triggered flow does not appear to have access to that field either.

Curious if anyone else has run into this?
Christine Nagikawa 9Christine Nagikawa 9
ran into same issue
Naveen KNNaveen KN
I see the same issue, recordId in the record-triggered flow is not having any value.