You need to sign in to do that
Don't have an account?

External Id with upsert on Batch apex
Hi ,
We have two independent objects ,
Object1 : Account Data is stored from external system. It contains both parent and child accounts . Child records in Object1 will have external Id of parent.
Account : Data from Object1 should be upserted in Account.
So , in execute method, we are first getitng the parent Accounts and storing it in map and then child accounts in another map.
But to associate the child account to parent we need either SF Id or External id. How do we use external Id as there is no relationship b/w Account and Object1.
We went throught these links but there is relationship b/w two objects.
https://salesforce.stackexchange.com/questions/220184/updating-a-records-using-external-id-in-apex
https://www.sfdcstuff.com/2017/04/using-databaseupsert-with-external-id.html
https://wdcigroup.net/salesforce-tip-creating-salesforce-parent-record-and-child-record-with-reference-key-cascading-insert/
Regards,
Desai
We have two independent objects ,
Object1 : Account Data is stored from external system. It contains both parent and child accounts . Child records in Object1 will have external Id of parent.
Account : Data from Object1 should be upserted in Account.
So , in execute method, we are first getitng the parent Accounts and storing it in map and then child accounts in another map.
But to associate the child account to parent we need either SF Id or External id. How do we use external Id as there is no relationship b/w Account and Object1.
We went throught these links but there is relationship b/w two objects.
https://salesforce.stackexchange.com/questions/220184/updating-a-records-using-external-id-in-apex
https://www.sfdcstuff.com/2017/04/using-databaseupsert-with-external-id.html
https://wdcigroup.net/salesforce-tip-creating-salesforce-parent-record-and-child-record-with-reference-key-cascading-insert/
Regards,
Desai