Loading

Salesforce Flow: "No such column" error on Get Records element in production

게시 일자: Jul 14, 2026
상세 설명

In Salesforce Flow, a Get Records (FlowRecordLookup) element generates a SOQL query to retrieve records based on specified filters and fields. If a custom field referenced in that query does not exist on the target object in the current environment, has been deleted, has a mismatched API name, or is not accessible to the running user due to field-level security, the flow fails at runtime with an error such as:

_"No such column 'CustomField__c' on entity 'CustomObject__c'. If you are attempting to use a custom field, be sure to append the '_c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names."

The field name shown in the error identifies the specific custom field that could not be resolved. This error commonly occurs when a flow is promoted from sandbox to production but the custom field was not included in the deployment, or when field-level security settings differ between environments.

This behavior applies to any Salesforce Flow Get Records element referencing a custom field on a standard or custom object.

There are two distinct causes for this error:

Missing or incorrectly named custom field: The custom field referenced in the Get Records element does not exist on the target object in that environment, has been deleted, or its API name does not match what the flow references (for example, a typo in the field name or a missing __c suffix).

Field-Level Security (FLS) restriction: The custom field exists and is correctly named, but FLS is not set to Visible for the profile or permission set of the user running the flow. Because the Get Records element generates a SOQL query, an inaccessible field causes the query to fail with the same "No such column" error.

솔루션

Step 1: Verify that the custom field exists and the API name is correct

  1. Copy the field API name (for example, CustomField__c) and the object name (for example, CustomObject__c) from the error message.
  2. Navigate to Setup > Object Manager, select the object referenced in the error, and open Fields & Relationships.
  3. Search for the field API name.
  4. If the field does not exist:
    • Click New.
    • Create the field using the correct API name.
    • Deploy the field to the target environment.
  5. If the field exists but its API name differs from the one referenced by the flow:
    • Go to Setup > Flows and open the affected flow.
    • Open the Get Records element.
    • Update the field reference to use the correct field API name.
  6. Save and Activate the flow.

Step 2: Verify Field-Level Security (FLS)

If the field exists and the API name is correct, but the error still occurs, verify that users running the flow have access to the field.

  1. Navigate to Setup > Object Manager, select the object, and open Fields & Relationships.
  2. Open the custom field referenced in the error.
  3. Click Set Field-Level Security.
  4. Ensure the field is marked Visible for the profiles or permission sets assigned to users who run the flow.
  5. Click Save.

Step 3: Limit the fields retrieved by the Get Records element (Recommended)

When a Get Records element is configured to Automatically Store All Fields, Salesforce generates a SOQL query that retrieves every field on the object. If any field is missing or inaccessible in the target environment, the query can fail with a "No such column" error.

To reduce this risk:

  1. Open the flow in Setup > Flows.
  2. Select the affected Get Records element.
  3. Under How to Store Record Data, change the option from Automatically Store All Fields to Choose fields and let Salesforce do the rest.
  4. Select only the fields that the flow actually uses.
  5. Save and Activate the flow.

Verification

After making the changes, verify that the issue is resolved.

  1. Open the flow in Setup > Flows and click Debug.
  2. Provide test input values that cause the flow to execute the Get Records element (for example, values that match an existing record).
  3. Run the debug session and confirm that:
    • The Get Records element completes successfully.
    • The "No such column" error no longer occurs.
    • The expected records are returned.
  4. Finally, run the flow in the target environment using a real record and verify that it completes successfully without any errors.
Knowledge 기사 번호

005388932

 
로드 중
Salesforce Help | Article