Close this search box.

How to Build a Salesforce Custom Report Type

Red Argyle Logo without name
Red Argyle logo

You’ve built a custom object, and now you’re trying to report on it and its child dependencies, but the report type generated by Salesforce isn’t giving you what you need. So what do you do? You build a Salesforce custom report type. Custom report types can be generated for any object that has the setting “Allow Reports” enabled.

When building the Salesforce custom report type, try to figure out the relationship of the objects from a top-down approach. When you have more than 3 objects related to one another in a custom report type, it starts to get tricky. For example, say you have a custom object Log. Records for this object are created when an exception occurs within the system. You want to run a report on how many Logs are being generated by each User in the system to see if there is a pattern. The report type created by Salesforce when the custom object is created doesn’t give you much information related to the User, so you must create a custom report type. I will chronicle the steps needed for this below.

This first image shows the definition of the Log object:


The second image shows the report type generated by Salesforce after the log object is created:

Salesforce Custom ReportsThe third image shows the fields on the report type generated by Salesforce. Note: These are all system fields generated by Salesforce.

Salesforce Custom Report Types

Now it’s time to build your Salesforce custom report. Go to Setup > Create > Report Types > New Custom Report Type. Your primary object should be the highest level object that you wish to pull into this report; you will be able to select related objects on the following page. Make sure “Deployed” is selected if you will be creating a report after you build this report type. You can change this after you have saved the custom report type if you do not select it at this stage. This allows you to build the report type and make changes before releasing it for other users to have report-building access.

Salesforce Custom Report Type

Next, choose the related objects. For our example, Users was our Primary object and Logs will be a secondary object. We want to report on only Users who have Log records related to them, so we want to make sure “Each “A” record must have at least one related “B” record.” is selected.

Salesforce User Log Report

After you’ve selected which objects you want to pull into the report, you can choose which fields you need. Salesforce automatically pulls all standard and custom fields for each object selected. If you want to pull information related through lookup fields, you can do that with the “add fields related via lookup” for the object selected in the picklist in the Edit Layout view. Drag and drop fields into and out of the groups to add or remove them from the report type.

Salesforce Custom Report

Salesforce Report Types

That’s it. You’ve created your Salesforce custom report type, and now you’re ready to create your report. Remember where you put the custom report type when you were defining it during creation so you can easily locate it when the time comes for report creation.You can also use Quick Find, but using Folders can give you structure and also security if your organization requires.

Red Argyle logo
Red Argyle logo

Related Blog Posts