Search code examples
salesforcesoql

Is there a way to select all Objects in Salesforce that start with a value?


I can select all apex triggers by using

select id, name from ApexTrigger

and classes by using

select id, name from ApexClasses

but is there a way to select all objects ?

I have tried

select id, name from Objects  but doesnt seem to work ?

Solution

  • SOQL queries run on exactly one object.

    If you need to perform a full-text search across multiple objects, what you need is SOSL, the Salesforce Object Search Language. Note however that SOSL is quite different from SOQL. See the linked developer guide for more information.