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

Gaurav
New Contributor III

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

2 REPLIES 2

kberry
New Contributor III

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.

RobbSalzmann
Valued Contributor

Adding to @kberry '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.