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

INVALID_TYPE: sObject type 'ObjectName' is not supported

What does this error mean?

This error is returned by the Salesforce REST or SOAP API (and by Apex dynamic SOQL) when the FROM clause references an object that the API cannot find, doesn't recognise at the current API version, or that isn't marked as queryable. It's the API-level equivalent of "no such table" in a relational database.

Common Causes

1. Missing __c suffix on custom objects

Custom objects must always include the __c suffix: My_Object__c not My_Object. The label shown in the UI is not the API name.

2. Querying a non-queryable object

Some Salesforce objects (e.g., certain metadata objects, history objects) are not accessible via standard SOQL — they require the Tooling API or Metadata API.

3. Managed package namespace prefix missing

Objects from installed managed packages require their namespace prefix: namespace__ObjectName__c.

How to Fix It

Solution 1: Verify the API name in Setup

Go to Setup → Object Manager → find your object → the API Name field shows the exact string to use in SOQL.

Solution 2: Check the object's queryable status

Apex
// Check if an object is queryable in Apex
Schema.DescribeSObjectResult descr =
    Schema.getGlobalDescribe().get('My_Object__c').getDescribe();

System.debug('Queryable: ' + descr.isQueryable());
System.debug('API Name: '  + descr.getName());
lightbulb

Pro Tip: Use Workbench → Utilities → REST Explorer to call /services/data/v59.0/sobjects/YourObject__c/describe. If the object is valid and queryable, you'll get a full field list. If not, the error message will tell you exactly why.