Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
1
vote
0answers
385 views

Record with duplicate external id was inserted through bulk API upsert

I have Account with user id as external id. I have a record of Account with user id 123 created 2 months ago. I have an upsert job created through bulk API yesterday with user id as ...
0
votes
2answers
4k views

Update an object field

How could I go about updating a field value of an object? For example, I have an object of type A and its id is 474xxxxxxx. The object of type A have a field f which type is a Picklist. I have a ...
7
votes
2answers
10k views

updating a records using external Id in Apex

I copied the product data to another object named foo. I used only the name and externalId of product to copy it to Foo object. Foo's external id matches with product's external Id. Some of my ...
1
vote
0answers
427 views

Bulk API v2.0 Failed records are confused

I'm developing code in java for upload data to Salesforce. All did fine but I've a problem with failed records with bulk API 2.0 with upsert action I have the next file csv for upload data for ...
0
votes
1answer
22 views

Upsert everynow and then creates a duplicate

Every now and then I have a duplicate account been created from a piece of code that looks like the one below, where there is only 1 upsert in the whole code. I am wondering why sometimes it creates ...
0
votes
1answer
38 views

Can't upsert data with external ID's using Data Loader

Similar to this question, I am not shown the related object windows to define what object the record is related to. I have tried manually editing the mappings but it always returns the same "Field ...
0
votes
1answer
551 views

Can't update existing record with external ID

I have this script that gets time entries from a time tracking tool and that I'm trying to push into a custom object in Salesforce : Time_Entry__c. After following this help page : https://developer....
4
votes
2answers
348 views

How can I upsert a homogeneous List<SObject>, in a good way? [duplicate]

I have some abstracted code, which at the end of some process will create a homogeneous list of SObjects. It could be a list of Accounts, it could be a list of contacts, it could be a list of some ...
0
votes
1answer
860 views

Upserting campaign members for campaigns

I have an apex class that creates campaigns based on mailings and then is supposed to add campaign members to the campaigns that were just created. The last step is done essentially by creating new ...
0
votes
1answer
369 views

Trying to turn HTTP 'POST' to 'PUT'; Desire Upsert, Not Just Insert

I originally had the following trigger and REST-callout class that functioned properly: trigger SendOpp_Trigger on Opportunity (before insert, before update) { for(Opportunity o : Trigger.new){ ...
0
votes
1answer
531 views

Duplicate records are created during upsert in Apex batch job

I need to extract records from an external application database table and Create a new table (custom object named CustomObj) in Salesforce to receive the data upload (upsert this based on the id using ...
1
vote
1answer
7k views

“INVALID CROSS REFERENCE ID” IN DATALOADER

I am trying to do upsert through data loader.It is throwing the following error for all rows in the csv file.The ids used in the csv file are correct.I got those ids from url. Please Help! ERROR: ...
2
votes
1answer
834 views

How to upsert a LookUp field via the REST API?

I have a field that's called AccountName and it's a LookUp field. When i try to update it with plain text, i get an error: id value of incorrect type, errorCode:MALFORMED_ID How can i upsert a ...
1
vote
0answers
453 views

Will not upsert on external ID (claims a MISSING_ARGUMENT)

I am upserting a list a list and it claims the external ID is missing. It is not missing as shown below. I have broken my big upsert into a for loop to track the problem. I have played around with a ...
1
vote
1answer
662 views

Marketing Cloud Preference center using AMP Script to upsert data

As we all know if we want to create a Custom Preference Center we need to use Cloud Pages HTML type page insert the HTML and AMPScript to UPSERT/update data. I have the AMP Script in place for my 3 ...
0
votes
2answers
5k views

How many records can UPSERT add or update in single request in salesforce..?

My question is if i want to insert 20,000 records and i choose to use UPSERT because it contain both insert and update. my data is going to be updated every day. is it true that UPSERT can only create ...
1
vote
0answers
559 views

Insert and/or Upsert not working

I've created two different classes, each writing to a different homebrew table and I'm not having any problem inserting in one of them, but I can't seem to get the other class to insert records into ...
0
votes
2answers
1k views

Salesforce REST upsert for externalId cause DUPLICATE_VALUE error

I send next upsert request to Salesforce: PATCH /services/data/v41.0/sobjects/Task/uuid__c/a22ac4d6-e2c0-4e53-898d-ea1d0c807775 HTTP/1.1 Host: **********.my.salesforce.com Content-Type: application/...
1
vote
1answer
4k views

Upsert failed - DUPLICATES_DETECTED

I am trying to import Contacts from external source abd im getting that error when i am inserting them into Database. The first time i insert them, there is no error, then if i try to insert them(the ...
3
votes
2answers
66 views

Can the exact type of an Apex list be checked to choose between upsert and insert/update?

I have a utility method that that works on lists of SObjects that are normally of one type: private void oneType() { Contact[] contacts = new Contact[] {}; contacts.add(new Contact(...)); ...
10
votes
2answers
14k views

Database.upsert - how to find which records have inserted/updated based on ExternalId

I am upserting list of records based on externalId as follows: List<Database.upsertResult> results = Database.upsert(lstRecords, CustomObject__c.External_Id__c,true); The results returns as ...
0
votes
1answer
155 views

How can I find out what fields made my upsert fail?

I'm trying to upsert some records. I use Database.upsert. If the failure is related to a duplicate value (external ids that have to be unique) I need to know what fields are duplicate and clear (...
0
votes
2answers
163 views

Dataloader upsert error

While I am doing an upsert operation in data loader, I am getting an error as: unable to obtain access to these records. What could be a possible reason for this?
0
votes
3answers
8k views

how to make upsert work instead of insert creating new duplicate record.?

My Object Test__c has two lookup Emp__c - 1st lookup Score__c -2nd lookup I have populated all the value. upsert (new Test__c(emp__c = 'XXXX',score__c = '123')); upsert (new Test__c(emp__c = 'XXXX'...
1
vote
1answer
558 views

fieldsToNull throwing INVALID_FIELD error

I am creating an SOAP upsert request and attempting to use the fieldsToNull tag to blank out a date field after it has already been given a value. I keep getting an INVALID_FIELD error. Bellow is the ...
0
votes
1answer
297 views

UpsertResult isCreated is not working

I am having issues with Upserting data. Here is my code: global static void MyMethod(string param1, string objName, string param2) { CustomObject__c record = new CustomObject__c(); record....
1
vote
0answers
18 views

Api Upsert by one of two admins overwrites the other admin's record instead of creating a duplicate

I have an org with two admins: AdminA and AdminB. AdminA upserts a record with an external ID - this creates a new record AdminB upserts the same record with the same external ID. I would expect ...
1
vote
1answer
535 views

Issue with External Id while upserting from external system using Salesforce SOAP API

We are facing some issue during upsert, please find details below: We have following objects: and sample data for the above objects: The external system is trying to upsert TankRead__c with the ...
0
votes
1answer
181 views

Does Insert happen for new records if I perform upsert on partial/full sandbox using Salesforce Id (instead of external id) from source?

Suppose I have records exported from source which includes records which are already in partial sandbox (Salesfoce Ids will be same for such records in source and partial sandbox) and some new records ...
1
vote
2answers
1k views

updating the child record and linking it to parent

I have scnerio where I am loading the child record from an external system and I want to connect it with the parent record. But I do not have the sfdc id of the parent record that I can put in the ...
0
votes
1answer
576 views

Update not working for Visual Force Page fields

I am writing a class to update a record with data from visual force page if it exists in contact, if it does not it will insert a row.I am using Update and Insert statements for this purpose.Looks ...
0
votes
2answers
424 views

Upsert not updating existing rows with visual force fields

I have a custom VF page and a custom class. There are several fields on the page. When Submit button is hit, a new row will be inserted if does not exit or the row will be updated if it already exists....
0
votes
1answer
433 views

Pre-populate text field in cloudpages form, if left at same value, use that

I've set up a form in Marketing Cloud. It pre-populates the fields from a data extension with people's details, opening the form with http://web.form.com/updatepref?PID=pidgoeshere It populates ...
3
votes
2answers
415 views

PHP Toolkit 20.0 (Enterprise) Upsert/Update Custom Object - deserializer not found

I'm using PHP Toolkit 20.0 (Enterprise) and the latest WSDL. Partner also fails for me. I can successfully create (using PHP Toolkit create) objects of this type. All my attempts to Update or Upsert ...
3
votes
1answer
978 views

INVALID_CROSS_REFERENCE_KEY, invalid cross reference id

I am trying to upsert the list below: OpportunityLineItem:{ Id=00k11000007NorcAAC, ServiceDate=2014-03-30 00:00:00, UnitPrice=200, Quantity=1, ProposalID__c=1, Status__c=IN_APPROVAL, ...
0
votes
1answer
1k views

Avoid Duplicate Id in a List

i have developed one visualforce page and it has multiple Group with Product and Bundle so, once user insert multiple Group with the Same product and same bundle then it's giving me an error as ...
-1
votes
1answer
864 views

How can I add multiple rows to a data extension?

Currently, I have a microsite which is being used as a form to insert / update data in a data extension. In data extension, email is NOT a primary key so I can have multiple records for same email ...
0
votes
1answer
150 views

value not updating from upsert

when click on edit outputlink text show in inputfield work fine but when save record its create new record instead of updating. how can i update record if id is already exists. my whole code of class ...
1
vote
2answers
305 views

Bulk data load job not visible for bulk upload

An external system uses the bulk api to push bulk data into Salesforce. THis external system will only push the data if Salesforce sends a request to push the data. I beleive all the bulk data that is ...
1
vote
1answer
1k views

Add dynamic lookup on Contact to sObject with external Id

I'm trying to make something that reads csv's and imports the data for our users, but SF ids for the lookups on the Contact are cumbersome for them as they already know the External Ids of the object ...
1
vote
1answer
974 views

Is It Impossible To Upsert OpportunityLineItem?

I would love to be able to upsert records to automate some data creation for a forecasting module, specifically Opportunity and OpportunityLineItem records. But I am becoming convinced that it is not ...
1
vote
0answers
42 views

Upserting a custom bridging object

I have been trying to upsert using the Bulk Data wizard and keep running into the same error no matter what I try. (And I have done this before with no problems - same object and type of data.) I ...
3
votes
2answers
159 views

Does Upsert operation in apex take more time against huge data?

I have a 50 gb data in my org for one object. My triggers will fire and upsert a record on it, does the volume of data show any impact in performing the UPSERT DML operation.
1
vote
1answer
116 views

Error when upserting an ID in a lookup field

I'm trying to insert an ID into a lookup field of an object. This is the code of my JS controller so far: var action = component.get("c.saveRent"); action.setParams({ "rent": newRent, }); ...
3
votes
1answer
2k views

Upserting Data using Data Loader with External ID

I'm using Data Loader in order to Upsert some data within my Org. I know, that if I will Upsert a record within my CSV that has duplicate External Id value with another record in the file, It will ...
1
vote
0answers
98 views

Salesforce Upsert - Conserving API calls when record existence is unknown

[This is a long post since I have to explain the logic for restore. Question is in bold.] I have backups of several objects (Standard and Custom) and have to perform restore. The current logic which ...
1
vote
1answer
436 views

Updating an existing Object fails with error INVALID_FIELD_FOR_INSERT_UPDATE

This is the exact error : from smartSync SFLogger ERROR com.salesforce : Sync type:syncUp id:6 FAILED cause:Server call for sync up failed error:Error Domain=CSFNetworkErrorDomain Code=400 "Unable ...
4
votes
1answer
871 views

What are Best Practices for Upserting Objects with Foreign Key Members (i.e. References to Other Objects)

I want to upsert objects through the .NET-ForceClient into our Salesforce, more specifically, I want to insert or update an object that contains a reference to another object. As a simple example, ...
3
votes
1answer
254 views

How to Interpret Bulk API UpsertResult element?

Below is the Result of the Bulk API job(batch) I submitted : <?xml version="1.0" encoding="UTF-8"?> <results xmlns="http://www.force.com/2009/06/asyncapi/dataload"> <result> ...
0
votes
1answer
87 views

Upsert contact conditionally

I am trying to upsert a contact conditionally if similar contact is found. Step 1: Prepare new contact data Contact c = new Contact(lastname = 'test', email = 'test@test.com', externalId__c ='12345');...