1

Is there any way to deploy Account hierarchy Columns through Metadata? So far I was unable to find the corresponding metadata in the documentation and also going through the Org Metadata with the VSCode OrgBrowser. What would be the way to go? Is it a manual deployment action to setup Account Hierarchy Columns on the Orgs?

1
  • Are you referring to the standard field ParentId field on Account ? May 13, 2021 at 6:08

1 Answer 1

3

You can, assuming you understand how to configure the package.xml to include

<types>
    ...
    <members>Account.Org_Account_Hierarchy</members>
    ...
    <name>ListView</name>
</types>

a resulting file in the objects (Account) folder after source org retrieval will give you the definition of a configured Hierarchy Column. Here is mine:

<listViews>
    <fullName>Org_Account_Hierarchy</fullName>
    <columns>AccContact__c</columns>
    <columns>ACCOUNT.NAME</columns>
    <columns>ACCOUNT.ACCOUNT_NUMBER</columns>
    <columns>CORE.USERS.ALIAS</columns>
    <columns>ACCOUNT.SITE</columns>
    <columns>ACCOUNT_SOURCE</columns>
    <columns>Active__c</columns>
    <filterScope>Everything</filterScope>
    <label>Org_Account_Hierarchy</label>
</listViews>

Now you can use Workbench or a tool of your choice to deploy the definition into a target org and/or store in source control.

2
  • 1
    Thank you, this is exactly the hint I needed! Didn't know this is handled as a List view.
    – Chris.Walz
    May 13, 2021 at 7:51
  • For anybody wondering- the relative path for this standard list view is- force-app/main/default/objects/Account/listViews/Org_Account_Hierarchy.listView-meta.xml
    – Sam Howle
    Nov 2, 2023 at 0:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .