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
jonathanrico.jonathanrico. 

SalesForce.com IDs are not consecutive.

Hello everyone,

 

We are having some issues when inserting a list of objects through WebServices API. It seems that a list of records is not inserted in the same order as they come in the list. We looked at the SFDC IDs and some of the records that are not at the beginning of the list are inserted with the first SFDC IDs and then the sequence of IDs stops and then it starts somewhere else.

 

Has anyone else had this kind of issue? Order of IDs is important for what we are trying to build,when we insert a list records through Apex we don't see this behavior with the IDs, however when doing the same thing with webservices we don't see the same results.

 

Thanks in advance! 

SuperfellSuperfell
You can make no assumptions about how ids are generated, particularly, their ordering, their sequentialness and their allocation to rows. I think you need to rethink your design.
jonathanrico.jonathanrico.

Thanks Simon, I guess I'll take a look at some other options for making sure I read the records in the order of insertion.