What is the logic for the automatic creation and update of “standard” report types for custom objects?

Question

What is the detailed logic for when a “standard” report type is created/updated for custom objects or custom relationships?

Background

When custom objects and custom master detail relationships are created Salesforce will often automatically create “standard” report types. For example, I create a new object “Project” I get a new report type “Projects”. If I created a master detail from Project to Account I get a new report type “Accounts w/Projects”.

These “standard” report types are preferable to custom report types as they don’t require maintaining the set of fields that can be returned in the report. In contrast custom report types require updates whenever a new field gets added to the account or projects object before the new field can be used in reports.

However, this automatic creation doesn’t seem to occur in all cases. For example, if I create the master detail from projects to account in a sandbox and then deploy to production the “standard” “Accounts w/Projects” report type doesn’t seem to get created.

Answer

Based on some light reverse engineering.

The “standard” report types are created whenever the enable reports option is checked on a custom object, or a master detail relationship to the reportable object is created, EXCEPT if there is a custom report type that includes the same relationships.

To “reset” things, delete any custom report types for the object you’re working with, uncheck ‘enable reports’ on the object, and then recheck. You’ll then have “standard” report types that may have been missing before.

And unlike “custom” report types, “standard” report types include all fields for the object by default and hence don’t require maintenance when new fields are added.

For some additional discussion see https://success.salesforce.com/answers?id=90630000000D1oTAAS

Note that there are a large number of variations in the order of things, particularly when your considering deployments. The above behavior may not apply in some cases.

Attribution
Source : Link , Question Author : Ralph Callaway , Answer Author : Ralph Callaway

Leave a Comment