6
The Power of Upsert and External IDs How To: Apex Code #MWD16

Salesforce - The Power of Upsert and External IDs - How To - Apex

Embed Size (px)

Citation preview

Page 1: Salesforce - The Power of Upsert and External IDs - How To - Apex

The Power of Upsert and External IDsHow To: Apex Code

#MWD16

Page 2: Salesforce - The Power of Upsert and External IDs - How To - Apex

#MWD16

Assume we have these accounts with external ids populated…

Page 3: Salesforce - The Power of Upsert and External IDs - How To - Apex

#MWD16

Open the Developer Console

Page 4: Salesforce - The Power of Upsert and External IDs - How To - Apex

#MWD16

Open Execute Anonymous Window

Page 5: Salesforce - The Power of Upsert and External IDs - How To - Apex

#MWD16

Insert a contact but rather than specify account’s id instead reference the account’s external id. Note use of the relationship field name, “account”, instead of the id field name, “accountId”.

Page 6: Salesforce - The Power of Upsert and External IDs - How To - Apex

#MWD16

Contact created and linked to account,all without knowing Salesforce record IDs!