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
Melanie.Hill@fernbach.comMelanie.Hill@fernbach.com 

Reports & Dashboards

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

Ispita_NavatarIspita_Navatar

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

Prashant.SakhujaPrashant.Sakhuja

Melanie,

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:

http://www.salesforce.com/us/developer/docs/apexcode/salesforce_apex_language_reference.pdf