Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
0
votes
1answer
17 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 ...
0
votes
2answers
34 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 = ...
0
votes
1answer
37 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, ...
0
votes
0answers
25 views

Upsert on PC Field

In an org with person accounts enabled, I am trying to figure out the proper way to perform an upsert. For example, I have ExternalID__PC and externalID__c on the account object. I am wanting to ...
0
votes
1answer
40 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", "...
0
votes
0answers
24 views

Reparenting Child Records in Apex using External Id and Upsert from Legacy Instance

I have inserted Accounts from a legacy Salesforce instance with their old system id set as an external id on Account sObject. When I go to upsert the legacy child Opps I want to use the Opps ...
1
vote
1answer
49 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
48 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
28 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 ...
0
votes
0answers
15 views

Importing custom object records with self lookup relationship to the custom object records on the same CSV file

I want to upsert some custom object records in a CSV file that has a lookup relationship to the another records on the same CSV file using sfdx upsert command. My CSV file: Name,Code__c,...
1
vote
0answers
92 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 ...
3
votes
2answers
354 views

How to use sfdx force:data:bulk:upsert on an object without an external ID?

I have a custom object (CustomObject__c) which is a child of another custom object. I want to import some records (CSV files) of CustomObject__c via SFDX (force:data:bulk:upsert). These are the ...
1
vote
1answer
56 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
2answers
228 views

Upserting Person Accounts using External IDs in Contact object

I am trying to upsert a record in Salesforce using the REST API. My endpoint looks something like this https://demoaccount--dev.my.salesforce.com/services/data/v45.0/sobjects/Account/...
0
votes
0answers
59 views

Upsert Data with dataLoader using multiple keys

Is there a way to import Data with DataLoader \ Wizard using 2 keys? For example - I want to import Data (Upsert) when the unique key is actually built from 2 keys : externalId field and a ...
1
vote
1answer
73 views

How to use simple salesforce (python library for salesforce) to add ShippingAddress field?

I have tried to upsert an account with ShippingAddress using simple salesforce However, I am getting the error: [{u'errorCode': u'JSON_PARSER_ERROR', u'message': u'Cannot deserialize instance of ...
0
votes
1answer
44 views

How do I continue to upsert with a SOAP call that has lookups that can't find a record via external id?

I have a SOAP request that sets the lookup fields using the lookup object's external IDs. However, for one particular lookup, I can't guarantee that it will find a matching Salesforce record. If that'...
0
votes
0answers
90 views

Before Insert, Before Update Trigger

I have a trigger that runs on before insert and before update using trigger.new. I am sending data in batches, so the tirgger.new holds multiple records, some inserts, some updates. I also have some ...
0
votes
0answers
57 views

Opportunity Trigger with Upsert

I have an opportunity trigger that runs before insert and before update. It has a recursive check on the before update and a separate one on the before insert so that each only run once. I am pushing ...
3
votes
0answers
155 views

How to insert records into an SObject using python beatbox module?

I am looking through beatbox's github repo here https://github.com/superfell/Beatbox/blob/master/beatbox/_beatbox.py#L122 And I am not sure whether I am using it correctly, specifically I am not sure ...
1
vote
2answers
210 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 ...
0
votes
1answer
97 views

testing upsert campaign members gives error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: []

Testing my apex controller in my dev org runs fine. However, testing the same file in another dev org gives error INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] Here is the controller ...
0
votes
1answer
439 views

Insert & Update (Upsert) Multiple Records of Same SObject Type in Single Transaction

I have a scenario wherein I have two custom object records of the same type, ObjectX__c. I need to update object A (which exists) with a lookup to object B (which doesn't yet exist and is being ...
1
vote
2answers
207 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 ...
0
votes
0answers
189 views

Issue upserting Account Contact Relationship - INVALID_FIELD_FOR_INSERT_UPDATE:Unable to create/update fields: AccountId

I'm upserting Account Contact Relationships the first load, works fine and we are upserting on a customer external ID field. When the upsert is run a second time - we see this error in the logs: "...
0
votes
1answer
21 views

Database.upsert - Lookup field is getting blanked, if updating an text area field of an object

We had a requirement to update a text area field of a custom object. As it was a bulk update, we use Database.upsert using an external id (happened through script already created in Mulesoft) and ...
0
votes
2answers
110 views

Cloudpage UpsertData publish problem

I am struggling with some UpsertData and i am running out of options. Hope you can see the problem. I have the following script on a CloudPage with a SmartCapture form: %%[ SET @DE1 = "...
1
vote
1answer
71 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 ...
0
votes
1answer
21 views

Order Product Object Change Non Updateable Fields

I found an older question which is similar use case that I am facing HERE. I would have just commented on that thread but I do not have enough rep points. Thank you! Is there a way to change a ...
0
votes
1answer
236 views

External Id upsert

I know that with External Id, I can upsert a record and that will Insert or Update the record base on the External Id (update if exists or insert if not) instead of the regular Id. Is there is a way ...
-1
votes
1answer
89 views

on trigger upsert: if value not found in select , create a new row in different object

I am having a beastly time trying to in a trigger, check the oldmap vs new map, if a certain value exists, check for existence of a row in another object, if that row exists update, otherwise insert a ...
0
votes
1answer
252 views

Restrict update existing record while upserting from Data loader

I am going to load data using WorkBench/Dataloader using UPSERT (ExternalId__c) DML operation. Once this ExternalId__c is matched then we have to check one more thing like Sr_number__c in that ...
1
vote
2answers
303 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
46 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 ...
0
votes
2answers
93 views

Trying to understand upsert - data loader

Im trying to understand how to use upsert.. for example there`s : ID = 1600. Type = Shipping To. and ID = 1600. Type = Billing to. Can I use upsert to update record where ID = 1600 and type = ...
1
vote
1answer
299 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 ...
4
votes
1answer
682 views

How to use upsert in REST callout JSON

"Upsert" just inserts new records from JSON, but not updates existing. It's my code: public class myClass { @future (callout = true) public static void getCallout(){ Http http = new Http(); ...
0
votes
0answers
298 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
2k 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
6k 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
348 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
21 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
35 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
354 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
241 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
589 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
226 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
390 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
5k 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
559 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 ...