function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ckempckemp 

Salesforce object ordering from API

I'm making an app that pulls Salesforce objects from the API and saves them in my local DB.  Certain S-objects refer to other S-objects of the same type (e.g. Account has a parent Account field) and when I do the data pull, the API appears to send them to me in safe order where if S-object B refers to S-object A (e.g. B's parent Account is A) then the API sends A first, then B after.

 

I can't seem to find a case where this does not work, but I want to be completely sure that I can safely make the assumption that these will always be set in a safe order.  Can any API experts confirm/deny this assumption please?

SuperfellSuperfell
denied. If you want a deterministic order, you need to use the order by clause in your queries