0

I am doing a upsert operation using soap api, but I need sort the sobject in which all parent should be upserted first and the their children. i.e if Lead object is depend on Acount object and contact object is depends on both Account and Lead object. Account should be upserted first, Lead should be second and Contact should be at last. when I use describeglobal() method, but it is sorted based on the name.

Is there any way we can sort based on the relationship ? I am working from C# code.

  • The Salesforce object dependency map is not a directed acyclic graph. Objects can, and frequently do, refer to themselves or to their own children. It's not a simple operation to serialize object insertion order in a fully general case. – David Reed Aug 29 '19 at 12:17

Your Answer

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

Browse other questions tagged or ask your own question.