Skip to main content
May 6, 2024
Solved

Is there a way to capture sibling positions while exporting Metadata hierarchy in XML?

  • May 6, 2024
  • 2 replies
  • 0 views

Hello Experts,
I'm trying to automate an export of account hierarchy which is then used to replicate same hierarchy in another app/tool.

However, when I export Metadata in XML (tried both via Business Rule or via Application>Load/Extract) , it doesn't capture information on order of arrangement among siblings.
So, while loading XML extract to new app, by default all siblings are arranged in ascending order of their member names.

Is there a way to capture this information when doing export? 

Thanks,
Gaurav

Best answer by KeithBerry

Hi Gaurav - Something else must be going on. For a fresh hierarchy build the members will be sorted in the order they appear in the Relationship section of the xml file. If you are updating an existing hierarchy, the old order will be retained.

2 replies

May 7, 2024

Hi Gaurav - Something else must be going on. For a fresh hierarchy build the members will be sorted in the order they appear in the Relationship section of the xml file. If you are updating an existing hierarchy, the old order will be retained.

May 7, 2024

Adding to KeithBerry 's comments, make sure you're using synchronous code and objects that preserve order when you pass the structure of the Relationship section to your target.  

Also, when you say:
"However, when I export Metadata in XML (tried both via Business Rule or via Application>Load/Extract) , it doesn't capture information on order of arrangement among siblings." 
It would be helpful to know what "it' is that isn't retaining the order of the relationship section in the exported XML.