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
Bethany SievertBethany Sievert 

How do I create a query for different record types? Does it matter?

I have a custom object with 5 different record types. There are some similar fields between record types, but for the most part the content can vary greatly. Can I create one query that accomodates all 5 record types? Is it better to create a query for each record type?
Aslam ChaudharyAslam Chaudhary
It depends on how much query you are doing in one transaction.
If there are very less SOQL query you can go for different query for different record type.