function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
surasura 

Query All Custom Objects in Single Query

Hi Guys,

 

need some help My requirement is  as follows.

 

I want to find all records that given user is the owner irrespective of object type . Querying each objects owner field in multiple SOQL  s is not possible because I have 100+ objects .

 

If you can give me any guidance in this matter it is highly appreciated. 

kiranmutturukiranmutturu
i think you can give a trail using sosl ..like

FIND {Joe Smith} if Joe Smith is the owner you will get all the records which contain Joe smith in any of the object field not only on owner... but this doesn't seems to perfect but i think this is the only option to start with
surasura

Hi kiran ,

 

that was the solution I was going for but  FIND does not support all fields . In find "ALL Fields" means all searchable fields.

which are of type test,Email,phone etc. It doesnt include lookups . is there any other way ???