Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 2995

All queries related to Upsert can be grouped under this Tag

3 votes
Accepted

The Query Cost of UPSERT

The upsert keyword in and of itself does not consume any queries. You could have an insert consume 99 queries in a complex org. … Contrariwise, you could upsert a record in a new object with no logic on it and governor consumption should be near zero. …
Adrian Larson's user avatar
  • 151k
4 votes
Accepted

Add dynamic lookup on Contact to sObject with external Id

You need to make sure that you use the correct relationship name. Here is a simple example that proves this functionality works just fine with a generic SObject record. SObjectField lookup = Contact. …
Adrian Larson's user avatar
  • 151k
1 vote
Accepted

Upsert from a trigger?

I agree with the duplicate vote here...but I won't badge hammer just yet. The correct solution here is to call Database.delete(duplicateIds). The steps should be: Identify duplicates Update existing …
Adrian Larson's user avatar
  • 151k