0

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 at 6:08
1

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.

1
  • 1
    Thank you, this is exactly the hint I needed! Didn't know this is handled as a List view.
    – Chris.Walz
    May 13 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.