home Homebuild Toolsbug_report Errorsmenu_book Guideslightbulb Tipssmart_toy Promptsextension Extensionsfolder_open Resourcesinfo About
search
error

MALFORMED_QUERY: No such column 'fieldName' on entity 'ObjectName'

What does this error mean?

Salesforce evaluated your SOQL query and could not find a field matching the name you specified in the SELECT, WHERE, or ORDER BY clause on the given object. The field either doesn't exist, has a different API name than what you used, or is not accessible at the API version your request is targeting.

Common Causes

1. Using label instead of API name

Field labels (shown in the UI) differ from API names (used in code). For example, a field labeled "Annual Revenue" has the API name AnnualRevenue. Custom fields end in __c — omitting this suffix is a very common mistake.

2. Outdated API version

A field added in API v55 won't exist when queried via an integration using API v30. The field is real, but the older API version doesn't expose it.

3. Typo in the field name

SOQL field names are case-insensitive but spelling-sensitive. AnnualRevenu instead of AnnualRevenue produces this error.

How to Fix It

Solution 1: Verify the API name in Object Manager

Go to Setup → Object Manager → [Object] → Fields & Relationships. The API Name column shows the exact name to use in SOQL. Custom fields end in __c; custom relationship fields end in __r.

Solution 2: Use Schema.describe to inspect fields programmatically

Apex
// List all queryable field API names on Account
Map<String, Schema.SObjectField> fields =
    Schema.SObjectType.Account.fields.getMap();

for (String fieldName : fields.keySet()) {{
    Schema.DescribeFieldResult dfr = fields.get(fieldName).getDescribe();
    if (dfr.isAccessible()) {{
        System.debug(fieldName + ' → ' + dfr.getLabel());
    }}
}}

Solution 3: Update the API version in your integration

If the field exists but only appears at a higher API version, update the version in your request URL: /services/data/v59.0/query?q=SELECT+.... Always use the latest stable API version unless you have a specific reason not to.

lightbulb

Pro Tip: Use the Workbench Schema Browser or Salesforce Inspector Chrome extension to browse all fields and their API names on any object without writing any code — much faster than navigating Setup.