Loading

UserRecordAccess RecordId Field Must Be Selected in Salesforce Flow Record Lookup and Fast Lookup

Publiseringsdato: Jun 8, 2026
Beskrivelse

In Salesforce Flow Builder, when using the Get Records element (Record Lookup or Fast Lookup) to query the UserRecordAccess object, the UserRecordAccess.RecordId field must be included in the fields to retrieve — even if RecordId is already being used as a filter criterion. 

Failing to include RecordId in the retrieved fields causes a flow runtime error.

Løsning

The UserRecordAccess object has a special restriction: the RecordId field must always be explicitly selected in any Record Lookup or Fast Lookup element that queries UserRecordAccess. This restriction applies regardless of whether RecordId is also used as a filter condition in the same element. This behavior is documented in the Salesforce SOAP API Developer Guide and is working as designed.

Error Message

When the RecordId field is not selected in the Get Records element, the flow produces the following runtime error:
"This error occurred when the flow tried to look up records: RecordId field must be selected. You can look up ExceptionCode values in the SOAP API Developer Guide."

Why This Happens

The UserRecordAccess entity has an API-level restriction requiring RecordId to always be part of the field selection in a lookup operation. This is unlike standard objects where filtering by a field does not require that field to also be retrieved. The Salesforce SOAP API Developer Guide documents this behavior for the UserRecordAccess object.

Resolution

  1. Open the affected Salesforce Flow in Flow Builder.
  2. Locate the Get Records element that queries the UserRecordAccess object.
  3. In the element's configuration, find the section where you specify which fields to store in record variables.
  4. Add UserRecordAccess.RecordId to the list of fields to retrieve.
  5. Save and re-activate the flow.
Knowledge-artikkelnummer

000383422

 
Laster
Salesforce Help | Article