• Skip to main content
Client Portal
(888) 391-4493
  • Salesforce Services
    Salesforce Managed Services

    Maximize your ROI and say goodbye to costly in-house Salesforce staffing with StarrData Team as a Service.

    Salesforce Administration

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

    Salesforce Implementation

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

    Salesforce Optimization

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

  • Salesforce Clouds
    Salesforce Revenue Cloud
    Salesforce CPQ

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

    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.

  • Who We Serve
  • Success Stories
  • Blog
  • About
    Guaranteed Customer Satisfaction

    A commitment to customer satisfaction doesn’t go far without a process for ensuring it. Learn how the StarrData Action Loop works to guarantee customer satisfaction, eliminating misunderstandings and scope creep.

    5-Star Certified Salesforce Partner

    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.

    Success Stories & Testimonials

    Read first-hand accounts of how StarrData solutions, customizations and ongoing support helped clients in multiple industries get more out of their Salesforce investment, enhancing productivity and customer satisfaction.

    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.

  • Talk to an Expert

Salesforce Reporting on Related Records by Parent Account

By Darren Starr
Linkedin
X (Twitter)
Account Hierarchy

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.

Learn more about Salesforce managed services
Posted in CRM
StarrData Logo

StarrData

3527 Mt. Diablo Blvd. #392
Lafayette, CA 94549

(888) 391-4493 x101

info@starrdata.com

Popular Links

  • Salesforce Implementation
  • Salesforce Managed Services
  • Salesforce Optimization
  • Salesforce Administration
  • Salesforce CPQ

Follow Us

Copyright© 2024 | Privacy Policy

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.