Custom report types for related objects
Key Takeaway
Create a custom report type when users need objects or fields that the standard report types don't include.
A report type defines the set of records and fields available to a report, based on the relationships between a primary object and its related objects. Salesforce provides standard report types for objects, but what they can join depends on the relationship types in your data model. With a custom report type, an app builder picks the primary object and adds related objects. The app builder can also pull in fields through lookups and decide whether parent records without child records appear.
What standard report types can join
| Relationship type | What standard report types can join |
|---|---|
| Lookup relationship | Data from the two related objects, in one report |
| Master-detail relationship | Three objects: the master, the detail, and one other lookup object |
| Many-to-many relationship | The two master objects and the junction object, through two standard report types |
If the detail object in a master-detail relationship has several lookup relationships, a separate report type is available for each lookup.
For a many-to-many relationship, the master listed first sets the scope of records the report can show. Each of the two standard report types sits in its own report category:
| Standard report type | Report category |
|---|---|
| "Primary master with junction object and secondary master" | The primary master's report category |
| "Secondary master with junction object and primary master" | The secondary master's report category |
When users need objects or fields that these standard report types don't include, you create a custom report type.