Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
-1
votes
1answer
1k 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
204 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
500 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 ...
2
votes
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
1k 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
44 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
185 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
125 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
3k 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 ...
2
votes
0answers
109 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
502 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
941 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
291 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
99 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');...
0
votes
1answer
147 views

How to remove reference link (__r field) between objects?

I am trying to find a way to unlink reference between two objects. We have an object of Academic_Institution__c and Previous_Academic_Institution__c. If "CEEB_Code__c" exist Academic Institurion is ...
0
votes
2answers
750 views

Using upsert with the partner WSDL SOAP API

I have created a DLL project in C# which is used to add a lead to a Salesforce account via the Partner WSDL/SOAP API. This DLL is called from an external .NET web application, and the idea is to send ...
0
votes
1answer
375 views

Scripted dataloader error: Expected 5000 to be processed for batch but got results for 4000

We have few jobs scheduled on data loader, we are receiving the error in the sdl.log file: Expected 5000 to be processed for batch but got results for 4000 Relevant portion log is given below ...
0
votes
1answer
268 views

Required fields are missing (Bulk API)

I'm trying to upsert a new Contact record using the Bulk API and it's returning the following error: [{"errors"=> [{"fields"=>["DDA_External_Id__c"], "message"=>["Required ...
0
votes
1answer
818 views

Using the DataLoader to upsert child records with a parent external id

Well, I just figured it out, but since I wrote it up already, I figured I'd post it here anyways in case anyone else has the same issue. I have two custom objects Case__c and CaseActivity__c that ...
1
vote
1answer
696 views

FLS Create for upsert

How manage FLS Create issues in Checkmarx for upsert statements ? I use isCreateable() for insert and isUpdateable() for update. But for upsert, I don't know what function I have to use (one or both)...
0
votes
1answer
291 views

Calculating the externalId field value using Dataloader CLI

I have a dataloader CLI process setup to import a csv file from a share folder. I am upserting to an object in Salesforce. This object is a junction object called employee training. The junction has ...
1
vote
2answers
1k views

Upsert from a trigger? [duplicate]

I want to update records before insert if there is a match on a lookupkey rather than inserting a new record. I have viewed the related question but do not understand how to get the trigger list to ...
2
votes
3answers
8k views

Bypass validation rules / duplicate rules during Import via DataLoader

I'm trying to import some data into a standard object like Account via the DataLoader. The problem is that, I have a duplicate rule on a specific field, and I set this field as required. When I want ...
0
votes
1answer
5k views

Challenging scenario while implementing a trigger

I have a specific scenario which I feel is a bit challenging and I would like to ask people's views in this forum on what they think could be a solution I have an custom object (employees__c) which ...
1
vote
1answer
293 views

Upserting Duplicates despite three part primary keys

Context: Someone in charge of customer journeys discovered duplicates in a resulting dataset based on one of our data extensions; we are now tasked with routing out the source of said duplicates. ...
4
votes
0answers
190 views

Upserting objects with many to many relationship using api

I am writing a script to run on a schedule to automatically import data from our accounting software into salesforce using their API. I cannot find a good way to upsert objects with many to many ...
2
votes
1answer
821 views

Get the inserted record id in a upsert call?

I am using below code to get the id of all record id whether it is update of inserted. upsert custmerList Name; for(customer__c afterUpsert : custmerList){ system.debug('*** Id = ' + afterUpsert....
1
vote
1answer
1k views

How do i Upsert record in Parent- child relationship from custom to custom object Using External ID

We have data integration Job for SQL SERVER - SFDC using Talend data integration tool. SFDC environment: Full sandbox Account We have two custom object. In that, Master-Detail relationship from ...
1
vote
1answer
223 views

Conditionally using External ID in upsert function

I want to use external id to reference a parent record on a lookup field. The problem is if this external id can't target that record, I just want to leave that lookup field a null. Contact ct = new ...
4
votes
0answers
2k views

Salesforce Bulk API upsert - Error: ENTITY_IS_DELETED

I am trying to restore a custom object from my backup where I am trying to upsert the records. Following this example. The external field is Id here. Assuming that there are no records matching, the ...
2
votes
3answers
793 views

Upsert failed in apex

I'm trying to do upsert and I get duplicate error on Unique field. Shouldn't upsert take care of whether to update an existing record or to add a new record? Error: caused by: System.DmlException: ...
3
votes
1answer
1k views

Multiple upsert: Creating Parent and Child Records in a Single Statement Using Foreign Keys

The following is my Apex class to upsert the below input into salesforce. INPUT {"req" : { "tickets": [ {"External_TicketID__c" :"66", "Date_Time__c": "2015-09-13T22:30:00.000Z", ...
-1
votes
1answer
234 views

Issue in upserting child object with master external id [duplicate]

I have one custom object named Class__c, which has one master relationship with another custom object named Plan__c. I have Class.csv files which contains classes objects. This csv file also has ...
1
vote
1answer
2k views

UPSERT function on a REST API

I have written an apex class for inserting records into salesforce.Is it possible for me to implement the 'Upsert' functionality through a REST API in salesforce?
0
votes
1answer
766 views

How Does Upsert Work When No External Id Is Specified?

I have looked at the documentation on Database Methods. What I do not understand is, what happens when an upsert is performed without specifying an external id field? Is it just based on whether or ...
13
votes
6answers
24k views

Why does upsert cause a DUPLICATE_VALUE error?

I have a custom object, with a Text Name (ID) field. When I upsert two records with identical Name/ID, but otherwise different values, in two separate upsert statement, one record results, as expected....
0
votes
3answers
743 views

Data Loader upsert with external id and opportunity id

Some of our opportunities are created in Salesforce and others are created in another system. I'm trying to make sure they all end up in both systems. When using upsert, in the data loader (just ...
1
vote
1answer
637 views

upserting a task using database.upsert

I am actually upserting a task using the Database.upsert method, but getting the following errors when compilling : Upsert require a concrete SObject type. my code is as follow : list<...
2
votes
1answer
5k views

Error: Accounts: Cannot specify any additional fields when marrying or separating a Person-Account

I'm using an ETL tool Talend for data push to salesforce. When I'm upserting the accounts getting the error below In the mapping I specified the business accounts recordtypeId but still is throwing ...
0
votes
1answer
150 views

upserting a feeditem

I'm actually working on a backup and restore procedure of my salesforce data, and my client wants the ability to restore their chatter feed also. I saw in the documentation (https://developer....
1
vote
1answer
511 views

How can I not update records using this Upsert?

I am attempting to create a new child record for each value of the multi-value field. I can only get the following code to create a new child record for the first entry into the list : //Data fields ...
0
votes
0answers
693 views

Error code : REQUEST_RUNNING_TOO_LONG

I have an application which call a Salesforce web service to upsert data into it but since yersterday, I get errors and I don't know why because it workded since a lot of times. These are logs : ...
1
vote
1answer
388 views

Salesforce Flow Opportunity to Order Errors

I have an interesting workflow and maybe that is what needs to change. Right now I have Shopify front end and am using Zapier to take orders from Shopify and create accounts in Salesforce as well as ...
2
votes
1answer
800 views

How to retrieve and update data from visualforce to apex controller

I don't have problem on retrieving data. But on updating the fields. I'm curios on how to do it.I tried something but seems not working. This is my apex Code: public class ...
1
vote
1answer
2k views

Upsert blank date via Salesforce REST API

How can I update with a blank date via the REST API? Do I need to "allow NULL values" someplace? I'm having trouble doing an upsert when I have a blank date value. I'm syncing with MySQL so it is ...
3
votes
1answer
943 views

programmatically selecting picklist item dependent value

I am writing a program which reads data from CSV text files and attempts to upload data into my organization's Salesforce account. I am writing this console application in C# and with my organization'...
0
votes
0answers
835 views

Upsert throws Missing Argument exception. Any thoughts please?

I tried to upsert and my code is below. But i am getting an exception and nothing is inserted or updated. Any thoughts please. if(lstp.size()>0) { Boolean isUpsertfirstTime = true; try { ...
6
votes
1answer
3k views

upsert on Custom Setting

I've got a page that inserts/updates a custom setting record. I'm using upsert for this purpose but I've run into an error: There is already an item in this list with the name 005700000037xJaAAI ...
2
votes
0answers
566 views

Can I solve the UNABLE TO LOCK ROW error with FOR UPDATE in this spot?

First of all, i've read most other posts about this error. The problem i have here is the code that was written in my org is using an UPSERT so don't see the spot where i can use the FOR UPDATE to ...
3
votes
2answers
2k views

Upsert query with only one record to insert/update

Is it possible to upsert only a single object? And return the ID of the inserted/updated record? I have an Custom Contact Object which i want to insert into the standard Object from Salesforce. The ...