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

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.