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
Bithyzis DimitriosBithyzis Dimitrios 

View Account Hierarchy Lightning Action Issue

Continuing from a previous discussion in the success.salesforce.com.
Due to reasons relating to a learning experiment I had to "hide" the original Parent Account Field from the Account Page layouts and substitute it with a new Lookup Field called Parent Account.

Tried to use the Lightning action View Account Hierarchy and the follwoing message popped up despite utilizing the Admin profile.

User-added image
It is my belief that the error is due to the action being "tied" to the original Parent Account field.

Please be so kind and point me out to the visual force page or Apex code that "governs" this action so that I can take it on as an exercise. 

I found the following post: https://success.salesforce.com/answers?id=90630000000hUjoAAE

Where Javier Accenture points out to modifying the controler but from looking at the developer console I could not locate it and the URL that populates after pressing the Account Hierarchy Button is not helpful at all.


With regards
​​​​​​​Dimitrios
 
NagendraNagendra (Salesforce Developers) 
Hi Dimitrios,

It sounds like since you're using a custom Parent Account field, you'll likely have to use a custom Account Hierarchy list. I don't think there's a way to change the standard account hierarchy lookup functionality. Sorry! :(

One idea would be to use some method (workflow rule maybe?) to copy the value in your custom lookup field behind the scenes to the standard Parent Account field. Then you'd be able to use the standard functionality for viewing the hierarchy.

If this helps you, please mark this as the best answer, like so: 

Thanks,
Nagendra
Bithyzis DimitriosBithyzis Dimitrios
Hello Nagendra

Unfortunately if the Standard Parent Account is set to "Hidden" the Account Hierrarchy Standard "function" is not opperational.
The idea was to "hide" the standard field and instead use a custom field on certain record types.
The user would populate the custom field and a visual flow would then populate the standard field so that for the Account Hierrarchy to be utilised.

Unfortunately once the standard field is "hidden" the Account Hierrarchy is not functioning. The only viable solution is to code a custom account hierrarchy. There are plenty blog posts on how to do it, though my luck in coding knowledge prohibits me from acchieving a satisfactory outcome.