Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
2
votes
1answer
614 views

Order of Bulk API result rows

I am performing multiple batch upserts using the Bulk API using an external ID field from my system. In order to determine which record ids from my system failed, I'd need the results rows to ...
2
votes
1answer
790 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 ...
2
votes
1answer
318 views

Upsert Attachment object

When upserting the fields of Attachment such as Name, upsert works while upserting body like: SObject upsertDoc1 = new SObject("Attachment"); upsertDoc1.setField("Name", "...
2
votes
1answer
839 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 ...
2
votes
0answers
551 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 ...
1
vote
2answers
2k views

Get ID with upsert

I'm trying to insert/update a custom object in database with upsert but after the upsert I need to get the database ID. Is there a way to get the new/updated ID on database without querying the ...
1
vote
2answers
651 views

UpsertData and DeleteData not working

I am using this AMPscript in a Landing Page, and it seems to prevent the page from displaying anything %%[ SET @SubscriberKey = QUERYPARAMETER('SubscriberKey') SET @Operation = '...
1
vote
1answer
1k views

Upsert custom object entry using entry ID to check if it exists to update or create new record?

I'm using this code to create an entry in a custom object which works. I'd like to replace the create with upsert to handle updating existing entries in the custom object when the entry ID is ...
1
vote
1answer
108 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 =: ...
1
vote
2answers
329 views

API requests calculation on a bulk upsert costing 6 calls

I am using the simple-salesforce Python package to upsert records into our Salesforce instance. I am finding that each bulk API call counts as 6 API requests. Is this correct? Is there a way to reduce ...
1
vote
1answer
516 views

Upserting on Dynamic List in Apex [duplicate]

I am trying to upsert a dynamic list of objects into Salesforce using Apex, before point of upsert I have casted a new list to explicitly describe which object this is but I still receive the ...
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 ...
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 ...
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
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, }); ...
1
vote
1answer
952 views

Want to upsert Attachment base on parentId

There is no external id column for Attachment object, but the requirement is to insert Attachment for the parentId if there is no attachment present else use the already existing one. Please suggest ...
1
vote
1answer
39 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 ...
1
vote
1answer
110 views

access to global picklist value from apex or trigger

How can we upsert data to global picklist value by using apex? I wanna catch record data from custom object by soql in apex, and upsert the data to global picklist value. Thank you in advance.
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: ...
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 ...
1
vote
1answer
981 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
1answer
540 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)...
1
vote
1answer
468 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 ...
1
vote
4answers
925 views

error while trying to upsert a list of Sobjects

I am trying to perform the following procedure: String tipoInt = 'Account'; List<SObject> sl = new List<SObject>(); Sobject so = Schema.getGlobalDescribe().get(tipoInt).newSObject(); ...
1
vote
1answer
464 views

Upsert in managed package fails with DUPLICATE_VALUE - Is custom WF rule root cause?

One can read about sporadic DUPLICATE_VALUE errors during Upsert in many forums. They mostly occur in Dataloader scenarios with a root cause being Oracle race conditions. But what I have here is not ...
1
vote
1answer
791 views

How to upsert multiple records with Apex controller

This code is able to upsert a single record in salesforce. I want it to save multiple records by breaking the long string of dates contained in the datesFromCalendar. datesFromCalendar contains data ...
1
vote
1answer
562 views

Can I UPSERT on Id using DBAmp?

I know I can upsert on an external Id in DBAmp. The DBAmp documentation makes a lot of reference to specifying the external Id in an upsert call, but no reference to making an upsert based on the ...
1
vote
1answer
100 views

Bulk Upsert: How do I know which records have been created/updated?

I read that records are in the same order as they are sent, but what happens if I upsert 5 records and only 3 are fine? For example: Fine Fails Fine Fine Fails Am I going to receive 5 records or 3? ...
1
vote
1answer
122 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<...
1
vote
1answer
81 views

How to use REST API (or preferably Restforce) to upsert and only update when field is blank?

I want to upsert Leads with the following rules: Match by Email If match is found, only update fields that are blank. Is it possible to do this by using API upsert? Is it possible to do it with ...
1
vote
1answer
559 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 ...
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 ...
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 ...
1
vote
1answer
201 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 ...
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?
1
vote
1answer
626 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<...
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 ...
1
vote
1answer
548 views

Why does upsert check lookup to determine duplicates rather than ID?

In a salesforce project, I have an object called Project__c which I want to upsert. I have recently added a lookup to the Project__c object and now when I do an upsert project, the following error ...
1
vote
1answer
82 views

Unable to upsert edited values

I have built a VF page with few checkboxes as columns. I'm able to inline edit, but cannot commit the changes to database. This is what I have tried so far... public class UserController{ public list&...
1
vote
2answers
94 views

Upsert account and filled in related lists

I'm using DataLoader for the first time and I have successfully used "upsert" to create new accounts. But I can't really get my head around the following: In my salesforce sandbox (which simulates a ...
1
vote
2answers
254 views

inserting records from a pivot table?

Is there a way to upload records based on a pivot table? If I have three objects in Salesforce, Object A represent hardware item, Object B represent price plan and Object C. Object C stores the ...
1
vote
1answer
100 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 ...
1
vote
1answer
58 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 ...
1
vote
0answers
29 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 ...
1
vote
0answers
205 views

Salesforce Bulkv2.0 job failed with error message: Failure writing to File store

I executed a bulk job using the Salesforce Bulkv2 API. Operation: Upsert Status: Failed State Message: Failure writing to File store I can't find information on this error and am wondering what ...
1
vote
2answers
357 views

Second Upsert does not update an AccountContactRelation

On AccountContactRelation we are using an external Id custom field Account_Contact_Id__c as the upsert field. The first upsert for a particular ACR is succeeding in creating the ACR. However, further ...
1
vote
1answer
54 views

Upserting to Object from VB and getting Invalid Field does not match externalid, but it does

I have a vb.net console app that is pulling info from a database, and upserting it to a Salesforce object. Here is the error I'm getting: INVALID_FIELD: Field name provided, Product2 does not ...
1
vote
0answers
388 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 ...
1
vote
0answers
428 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 ...
1
vote
0answers
457 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 ...