Upserting records
Upserting records is the combination of inserting and updating records. The user needs to have access to Create and Edit on the object that we need to upsert. But when should you use this functionality? This functionality is very useful when writing code for integration with other systems.
A table with data in a different database system will probably have another unique key. A company can have a database with the contacts of a company, and their key is the email address (because it should be a unique reference). Based on this unique reference, Salesforce can decide whether a record already exists.
Based on that decision, Salesforce will insert your record if the email address does not exist in the table with contacts, or ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access