INVALID_TYPE: meaning and how to fix it
Quick answer
INVALID_TYPE: The object name in the query or API call does not exist, is misspelled, lacks __c, or the user cannot see the object. Start with: Check the object API name in Object Manager.
Typical message: INVALID_TYPE: sObject type 'Foo' is not supported.
Cause
The object name in the query or API call does not exist, is misspelled, lacks __c, or the user cannot see the object.
How to fix INVALID_TYPE
- Check the object API name in Object Manager.
- Custom objects end with __c.
- Check that the user has Read access to the object.
Have a different message? Paste it into the error decoder, which matches it against 45 common Salesforce errors in your browser.
Frequently asked questions
What does INVALID_TYPE mean in Salesforce?
The object name in the query or API call does not exist, is misspelled, lacks __c, or the user cannot see the object.
How do I fix INVALID_TYPE?
1. Check the object API name in Object Manager. 2. Custom objects end with __c. 3. Check that the user has Read access to the object.
More SOQL and queries errors
SFDX Talk is unofficial documentation. It is not affiliated with, endorsed by, or sponsored by Salesforce, Inc. Message text varies slightly by release and context, so confirm against the official page before relying on it.