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 

Reports & Dashboards

For using 2 data structure in one query: Is there a possibility to use a SQL-UNION like feature to merge them?


Have u tried the custom report types , it is method to join data from two different objects?



You can use report to achieve that orcreate a custom report type using 2 or 3 objects.


You can also try a query like this:



for (Account a : [SELECT id, name, (SELECT lastname FROM contacts)
FROM account
WHERE name = 'Acme']) {
Contact[] cons = a.contacts;



See page 60 of this pdf for more details: