11

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.

  • 4
    I believe you're confusing standard report types and custom report types. Standard report types are generated automatically, while custom report types are only updated manually. – sfdcfox Jul 3 '14 at 1:46
  • 2
    @sfdcfox that is what I'd thought, but in testing that wasn't the case. I created a brand new master detail to an object that was a child of the an account, the new report type was available automatically in sandbox. It also automatically included fields I had created after creating the relationship. I'm the only one using the new relationship, so it's borderline impossible someone created it for me. However when I deployed to production, I had to create the custom report type manually. – Ralph Callaway Jul 7 '14 at 15:20
  • 1
    noticing some patterns, the presence or lack of a custom report type with the same objects and when the enable reports checkbox on was set. when a "standard" report type wasn't showing up when expected I was able to get it to show up, by deleting custom report types to the custom object then unchecking and then re-checking the enable reports box on the custom object ... – Ralph Callaway Jul 4 '16 at 19:27
5

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.

  • Wow, I had no idea a 'standard' report wouldn't get created if there was an existing custom report. Do you know what happens if you're deploying from a sandbox that has both a master/detail and a custom report type, to an environment without either? Do we get the master/detail field created, the standard report types created, and the custom report type? – Nick Cook Jul 5 '16 at 14:38
  • @NickCook, i've seen weird behavior, but i didn't have the time and extra dev orgs with sandboxes to put anything to the test. i could see things going either way, so many different permutations on the order of things. Put up the bounty to see if anyone wanted to give a thorough of investigation a try but no takers ... – Ralph Callaway Jul 5 '16 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.