Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
-2 votes
0 answers
42 views

Batch class to upsert the record

Edited - I am upserting records with external id ssn so how should i put my ssn in failureIdsSet so that I can call the failureIdsSet in email alert. I have a batch class which I use to upsert records ...
user avatar
0 votes
1 answer
16 views

Product name upsert to a data extension on click and redirection to cloud thank you landing page through AMPscript

as the title says, I have a number of products in an email in SFMC. On click on any of the products, I'm trying to capture the product clicked on, upsert the name of it to a Data Extension then open / ...
user avatar
  • 369
2 votes
1 answer
34 views

SOAP XSL Integration error during upsert: "cannot specify Id"

Below is an example of the SOAP request that is being sent to Salesforce from our app. <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://...
user avatar
  • 23
2 votes
0 answers
29 views

How do I perform Upsert using Enterprise WSDL v54?

Attempting to use the Upsert function contained in the Enterprise WSDL (Salesforce Sandbox) version 54. Unfortunately not very familiar with SF development or Upserts, the documentation on the ...
user avatar
  • 31
1 vote
0 answers
57 views

Data Loader Upsert Error : MISSING_ARGUMENT:External_ID__c not specified

I tried to make upsert method in data loader, when External Id is null i expected it will running method insert, when external id is not null it will running method update. Everythings work fine in ...
user avatar
0 votes
1 answer
193 views

SQL query to update field only if it is empty

I need to run a query which updates a target DE with some rows from another. There is a field called 'origin' which shows on the target data extension where the data came from. I appreciate this may ...
user avatar
  • 802
1 vote
1 answer
99 views

How to get UpsertData function to insert data into the data extension?

On the landing page I have a form that is submitting and gathering all the RequestParameter values. When it gets to the UpsertData function it doesn't fire even the few values I have in the function ...
user avatar
  • 11
1 vote
1 answer
509 views

Update (never insert) a record by External Id using REST API

Salesforce offers a way to upsert a record by a given External Id: curl https://na1.salesforce.com/services/data/v20.0/sobjects/Account/customExtIdField__c/11999 -H "Authorization: Bearer token&...
user avatar
  • 577
0 votes
0 answers
59 views

REQUIRED_FIELD_MISSING when saving data

Hello I'm getting this error when saving data from a form to database. This field isn't a field from My contact I just add it to try to solve the issues, but nothing happens. 11:32:59:059 FATAL_ERROR ...
user avatar
-1 votes
1 answer
17 views

Get records modified by SF Data Loader App (or get history of jobs on it)

I did some bulk upserts using csvs and SF Data Loader. However, my formatting was off for my external Id and "duplicate" records were created instead. Is there a simple option to revert jobs ...
user avatar
3 votes
0 answers
80 views

UPSERT REST Api creates new record because of space(%20) urlencoding

I'm currently trying to use the salesforce UPSERT endpoint. The ExternalId that I'm using contains a space, like so: North America_12345 so my URL looks like: /services/data/v49.0/sobjects/...
user avatar
0 votes
1 answer
25 views

Upsert not working in apex class

I have two object temp__c and NFSave___c. I am dumping all the data in temp object through data loader in rich text area field(Section__c). Then I am sending the data with apex class from Section ...
user avatar
1 vote
0 answers
146 views

DataLoader batch job failing with PricebookEntry upsert

I have an issue with our PRICE BOOK ENTRY Upsert using the DataLoader batch bulk job. We have External IDs in our PRICE BOOK and PRODUCT objects that we use when Upserting to our PRICE BOOK ENTRY ...
user avatar
  • 11
-2 votes
1 answer
41 views

Check if upsert necessary

I am using external id and rest callout to another org, but is there a way to check if i need to make callout? Cause callout called even if all fields are the same. I can compare all fields, but its a ...
user avatar
0 votes
1 answer
52 views

Rest upsert callout

How can i make an upsert callout? I have object Contact with custom ExtId with Custom_Object__c id. So i am tried post, patch method and without/with '?_HttpMethod=PATCH'; What do i need to do? I ...
user avatar
0 votes
0 answers
31 views

lightning:recordEditForm does not updating, just inserting

I used lightning:recordEditForm in my aura component file and save button function is okay but I want update an already existing record.. When I click the 'save' button in edit page, a new record is ...
user avatar
0 votes
1 answer
306 views

Workbench upsert: how to use an External id?

I want to update a number of Cases using a CSV file that contains two fields: case number (NOT technical id, but the automatically generated human readable id/name) and a textual complaint. Data ...
user avatar
1 vote
1 answer
390 views

Python Simple Salesforce - Upsert to CampaignMembers Object

I am trying to find an automated way to add contacts & leads to existing campaigns by using simple salesforce to upsert records to the CampaignMembers object. I have a CSV file with CampaignId and ...
user avatar
  • 23
0 votes
1 answer
134 views

Upsert list<SObject> with external id

I want to upsert a list of generic sobject with the external id field. This list of generic sobject contains records from different sobjects, where the sobject type will be unknown and will be ...
user avatar
0 votes
1 answer
74 views

Is it possible to perform upsert operation on UserTeritorry2Association?

I am writing a batch class on the UserTerritory2Association SObject and I need to perform an upsert operation. I have tried to use insert and records are getting created but if I need to do upsert I ...
user avatar
  • 174
0 votes
1 answer
34 views

upsert operation using IdLookup

I want to perform insert and upadate operation on Account on same record by using following query but It inserts two accounts with different descriptions Account acct = new Account(Name = 'practice ...
user avatar
0 votes
1 answer
22 views

can we insert a date value when the Closing date on opportunity is Null using a before trigger?

we are using dataloader to upsert records into Opportunity object but there might a case where there is no Closing date for some records, in that case, can we insert a particular date value using ...
user avatar
0 votes
2 answers
139 views

Update both Pricebook2 and PricebookEntry objects using just one for loop

Having the next code: for (WrapperTest pb : pbs_lst) { Pricebook2 newPB2 = new Pricebook2(); PricebookEntry newPBE = ...
user avatar
  • 155
0 votes
1 answer
135 views

The Query Cost of UPSERT

In an Apex Test, I'm getting the 'Too many SQL queries: 100' error. Quite a lot happens in the code that is called (it's an API endpoint, not just a single function) and in one scenario, the end point ...
user avatar
  • 182
0 votes
1 answer
59 views

Block an insert call or convert it to upsert in trigger

Zapier connects our forms to our Salesforce instance. However, Zapier does not provide an upsert call as a way to insert a record, only insert and update. This means we have to use up more of our ...
user avatar
0 votes
1 answer
191 views

Upsert without an external Id

We have external system that is pushing an event using Platform events saying that an asset is changed. I have created a Platform event object and a trigger on it, make a webservice callout to get ...
user avatar
0 votes
1 answer
268 views

Upsert DML Operation

Consider the below code. I thought the way upsert DML works is that if it sees that there is a new record with matching key (here in this case there is already an account with Name = Acme and ...
user avatar
0 votes
1 answer
82 views

How can I update opportunity / account / product with a Json that gives a web service as a response?

enter code here currently the web service receives as a parameter a Json that is sent with salesforce information of opportunity / account / products. In turn, the web service generates a Json ...
user avatar
0 votes
0 answers
177 views

Apex upsert duplicate external id specified error

Long time listener, first time caller (and apex-er). I have a class to copy subscription items to a custom ARR Sub Line object; from there I can use out of the box rollups to pull my ARR onto ...
user avatar
0 votes
1 answer
120 views

How to update Email Opt Out field?

Is there any way to update the Email Opt out field ? this is OOTB field in SF but when i trying to save my code IDE told my " field is not writeable" The API name is IsEmailBounced
user avatar
  • 135
0 votes
0 answers
225 views

stripinaccessible stripping fields for system administrator

I have a generic function to validate CRUD before DML which uses stripInaccessible(). public static SObjectAccessDecision validateCRUD(AccessType access, List<SObject> records, Boolean ...
user avatar
  • 155
0 votes
1 answer
130 views

Bulk API upsert error for a Field type Location

I'm using the Bulk API v2 for upserting data into a CustomObject. When i try to upsert data without the CustomField Location, it works correctly, but when i add in the CSV the Location__c header, i'm ...
user avatar
0 votes
0 answers
117 views

Use Database.upsert with external id field is not working on PricebookEntry object

I need help to do a DML operation with external id field. I am using the below syntax, but it is throwing an error Schema.SObjectField f = PricebookEntry.Fields.Product_Code__c; Database.UpsertResult[...
user avatar
  • 145
0 votes
2 answers
577 views

Force RecordTypeId to Null on Contact

I am working in a very old org where majority of the contacts do not have a recordtypeid, and contact visibility, page layout assignments revolve around this master no record type id contact record. ...
user avatar
  • 1,838
0 votes
0 answers
88 views

Dealing with failed records in an Upsert operation

With the help of responses to my previous posts I was finally successful in Upserting Contacts in Salesforce via Jitterbit using External Id. However two records failed. I am thinking these failed ...
user avatar
1 vote
1 answer
426 views

Check if Parent record exists using parent's External Id before inserting child

I have a child__c object that has a lookup relationship to Parent__c. Each have an ExternalId__c field in them. I am trying to create this relationship when inserting a child record. List<...
user avatar
  • 4,521
0 votes
1 answer
110 views

UpsertDE with Composite Primary Key for Journey Activity Tracker

I'm attempting to create a Journey Activity tracker for a DE with a Composite Primary key of [Subscriber Key], ContractID, and ContactId. Here is what I've attempted to insert within each email and it ...
user avatar
2 votes
1 answer
1k views

How to prevent an upsert from overwriting fields with existing values with null?

I have an object that I update overnight by getting data from an external system. In the callout I cast the data into my object and do an UPSERT with external ID. It all works correctly apart from one ...
user avatar
0 votes
1 answer
141 views

How to run upsert in salesforce using firstname + lastname + email [closed]

I am using salesforce object as target in Informatica. The source is a csv file. I want to run upsert function in salesforce with a matching criteria Firstname + Lastname + Email. Right now I have ...
user avatar
0 votes
1 answer
2k views

Foreign Key External ID not found even though value exists

When performing an upsert operation via Mulesoft on a record that is a child of Account in SFDC, we are seeing the error "Foreign key external ID: 0000336681 not found for field ...
user avatar
0 votes
0 answers
81 views

Merge Duplicate Contacts

So I have Salesforce system that was implemented 6 years ago and sits ontop of a extremely old sales system. When implemented it was built in a way that it creates duplicate contacts on different ...
user avatar
1 vote
1 answer
104 views

Does 'upsert' process provided list by 200 records?

I have a field on Contact object that is called Test__c. It is Text(18), unique & external Id. I'm trying to upsert a list of Contacts by the Test__c field. The last Contact on the list has the ...
user avatar
1 vote
1 answer
322 views

Upsert causes custom and standard Duplicate Rules to fire

Could you help me understand why does my duplicate rule is firing upon insert? This is the controller: Boolean idExists = false; List < Lead > leads = [SELECT Id, Name FROM Lead WHERE Email =: ...
user avatar
  • 1,443
0 votes
1 answer
254 views

User Upsert View All Data error through api

[{"message":"ViewAllData or ViewAllRecords required to upsert by standard field","errorCode":"INSUFFICIENT_ACCESS"}] I'm trying to upsert to an existing record by the ID using a PATCH call. Closest ...
user avatar
2 votes
2 answers
188 views

How to update existing records and upsert new records

I want to update existing task records but a new record gets created instead . What am I doing wrong. Apex: public static void Activities(List<Account> accounts) { Set<Id> persAccIds = ...
user avatar
  • 2,090
0 votes
1 answer
149 views

Upsert error with apex batch job

I have a custom object named AttendanceRate with 5 fields "AttendanceRate_' + weekDay + -'__c' for each day of the week. When a user creates an activity, he has 100% of attendanceRate for this day, ...
user avatar
  • 223
0 votes
1 answer
66 views

Insert JSON to salesforce

I have a JSON which I got from An outer System to Salesforce and I should eventually insert it to SF. { "AFTR0": [ { "AFTR1":"U", "AFTR2": "3dcda8f9213ad43aafe456ae489a158b", "...
user avatar
  • 959
1 vote
1 answer
325 views

Upsert using encrypted field as external ID

I am looking to use an encrypted field as an external ID for the upsert function. As long as the user running the upsert has read access, the fact that it ID for the upser is encrypted shouldn't ...
user avatar
1 vote
1 answer
142 views

How to add Salesforce Id field for records that I am trying to update?

I am trying to update and insert (upsert) a bunch of records into Salesforce. The records are in a json file on my hard-drive. The records are inserted but if they already exist, they need me to ...
user avatar
1 vote
0 answers
32 views

Salesforce Upsert Differing Fields [closed]

So, I have a situation, and I am trying to decide between an upsert, and an update + insert. I am thinking it will be the latter. Is it possible to ONLY upsert values that are null within ...
user avatar

1
2 3 4 5