You need to sign in to do that
Don't have an account?
Puzzled
Are objects added in list order and their returned IDs also in that order?
I am trying to create a group of accounts and one contact per account, bulk-enabled. The most straightforward way is to add all the accounts and then all the contacts.
If I put the new accounts and contacts into lists in the same order, will the IDs I get back from inserting the accounts be in the same order as they were in the list so I can use their IDs in the contact inserts?
Thanks.
The IDs will be properly populated after execution of DML statement and the order maintained,
so you can safely go ahead and code your implementation.