• Skip to main content
StarrData StarrData StarrData
  • Technologies
    Salesforce Revenue Cloud
    Salesforce CPQ

    Deliver fast & accurate proposals that empowers your sales team and maximizes company revenue.

    Salesforce Billing

    Seamlessly integrate your entire billing process with powerful Salesforce technologies.

    Salesforce Products
    Sales Cloud

    Empower your sales team by leveraging best practices throughout the company.

    Experience Cloud

    Connect your customers, employees & partners with the power of Salesforce.

  • Services
    Salesforce Implementation

    We'll help you get up and running quickly - from simple implementations to fully customized instances.

    Salesforce Administration

    Stop worrying about the day to day details of Salesforce and outsource to a 5-star certified Salesforce team.

    Salesforce Optimization

    Get the most out of your Salesforce investment by fine tuning your instance specifically for your needs.

  • Industries
  • Blog
  • Company

    Since 2009, StarrData has helped hundreds of companies leverage the power of Salesforce. We are a 5-star certified partner with an experienced team of consultants, solution architects, engineers, and administrators.

    Testimonials

    See what our clients say.

    Partners

    Companies we partner with to provide ancillary services and integrations.

    Commitment to Equality

    At StarrData we believe that all humans are equal, and diversity is a strength. We are committed to providing equal employment opportunities and world-class service to anyone, regardless of sex, color, gender, religion, or sexual orientation.

  • Client Portal
  • Contact

Salesforce Reporting on Related Records by Parent Account

By Darren Starr
Facebook
Twitter
Twitter

Updated on August 3, 2020

Do you ever work with customers who have multiple subsidiaries or divisions? If so, you might be stuck figuring out a way to make this work in Salesforce.

Don’t worry. We have a solution!

Click here to download our FREE Salesforce Best Practices Guide!

By using the out-of-box “Parent Account” field on the Account page in Salesforce, you’re able to quickly and conveniently link Accounts and display this hierarchy information in a visual format to see how records relate to each other. This works well on the Account object; however, the hierarchy functionality does have some limitations.

This picture shows a multi-level hierarchy with multiple parent and child records in the chain. A Salesforce user could access Accounts with multiple parent-child Account combinations in the list.

What happens if you want to run a report on all of the Contact records for the Accounts in the hierarchy for a mass email? Or what if you wanted to run a report of all of the Opportunities records for the Account chain to see the total value of the top-node parent Account? Unfortunately, Salesforce does not natively have this type of functionality, but with a little formula fieldwork, you can run reports for the use cases above and more.

We’ve quite often run into these Salesforce reporting issues ourselves here at StarrData and with our clients, so we thought we would share our solution and ideas with the broader community. By creating a Cross-Object Formula field, you can reference linked records up to 10 levels away.

The text formula we developed allows reporting on Contacts, Cases, Opportunities, (or other objects related to accounts) for the whole hierarchy. By using a custom link (click here to see our blog series on creating these) you can then place access to the report on all account pages. The report will use the custom formula to pull all related records in the hierarchy, no matter where in the hierarchy you click on it.

The picture above shows the report for all contacts in the hierarchy: The formula field we created is named “Parent Account Report ID” for clarification, but you can call it anything you like.

We also included the Contact ID in the report so you could see that each contact, anywhere in the hierarchy, has a unique ID. The rest of the columns in the report just demonstrate that all accounts are represented, as well as their associated contacts.

IF( ISBLANK(ParentId) ,  Id ,

IF( ISBLANK( Parent.Parent.Id ) ,  ParentId ,

IF( ISBLANK( Parent.Parent.Parent.Id ) , Parent.Parent.Id,

IF( ISBLANK( Parent.Parent.Parent.Parent.Id ) , Parent.Parent.Parent.Id,

IF( ISBLANK( Parent.Parent.Parent.Parent.Parent.Id ) , Parent.Parent.Parent.Parent.Id,

IF( ISBLANK( Parent.Parent.Parent.Parent.Parent.Parent.Id ) , Parent.Parent.Parent.Parent.Parent.Id,

IF( ISBLANK( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id ) , Parent.Parent.Parent.Parent.Parent.Parent.Id,

IF( ISBLANK( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id ) ,  Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id ,

IF( ISBLANK( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id ) ,  Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id ,

IF( ISBLANK( Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.ParentId ) , Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Id,

IF( ISBLANK(Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.ParentId ) , Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.ParentId ,   Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.ParentId

)))))))))))

Download Our Free Guide With Salesforce Best Practices

StarrData is a Salesforce Silver Partner that helps companies deploy, optimize and support Salesforce.com. If you would like information on the services we offer call us at (888) 391-4493 x101.

Posted in CRM

Contact Us

888-391-4493 x101

1261 Locust St. #135, Walnut Creek, CA 94596

info@starrdata.com

Salesforce Partner Since 2009
Pledge1_ProudMember_Smallest

Additional Resources

  • Technologies
  • Services
  • Client Portal
  • Contact Us
  • Privacy Policy
  • Sitemap

About Us

StarrData is a 5-star rated salesforce.com partner who helps companies increase sales and productivity by providing Salesforce implementation and support services. Since 2009 we have helped hundreds of organizations to leverage the power of Salesforce.

© 2020 StarrData. All Rights Reserved.

Our Spring Sale Has Started

You can see how this popup was set up in our step-by-step guide: https://wppopupmaker.com/guides/auto-opening-announcement-popups/

Our Spring Sale Has Started

You can see how this popup was set up in our step-by-step guide: https://wppopupmaker.com/guides/auto-opening-announcement-popups/

Contact Us Today

To speak with someone right away, give us a call at (510) 984-3648.

  • This field is for validation purposes and should be left unchanged.