function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CaraSourceCaraSource 

Need Help Creating a Top Level Account field

I'm trying to create a custom formula field for Accounts that returns the name of the Parent Account if one exists and, if it doesn't, just returns the Account name. This will allow us to group info by the "Top Level Account" whether or not it's in a hierarchy.

What I've got now works except that I can't find the "Parent Name" field - I can only return the Parent Account ID. Is the name hidden away somewhere or is there a better method for this?

Here's my formula:

IF (( ParentId="" ), Name, Parent_Id__c )

Thanks!
Marc PannenbergMarc Pannenberg
Hi!

It seems that although it's a lookup, salesforce.com does not grant access to the fields of the parent account per the usual cross-object formula. You would have to use an S-Control or Apex for it.

Marc