Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
0
votes
0answers
19 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 ...
0
votes
1answer
29 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
0
votes
0answers
54 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 ...
0
votes
1answer
33 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 ...
0
votes
0answers
39 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[...
0
votes
2answers
57 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. ...
0
votes
1answer
154 views

Upserting records via Simple_Salesforce API on a field with Master-Detail relationship

I'm trying to use Python's simple_salesforce library to upsert on an object called Member Plan that has a required field called MemberId which is a Master-Detail relationship with the Account object. ...
0
votes
0answers
41 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 ...
1
vote
1answer
120 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<...
0
votes
1answer
32 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 ...
0
votes
0answers
15 views

Contact to Multiple Accounts via jitterbit

I have set up Contacts to Multiple Accounts We plan to write a jitterbit query to pull data from an external system to UPSERT Contacts in Salesforce. My question is - When UPSERTING Contacts ...
0
votes
1answer
74 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 ...
0
votes
1answer
38 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 ...
0
votes
1answer
310 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 ...
0
votes
0answers
44 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 ...
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
105 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 =: ...
0
votes
1answer
78 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 ...
2
votes
2answers
56 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
62 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
1answer
46 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", "...
1
vote
1answer
99 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
201 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
1k 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
107 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
541 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
99 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 ...
2
votes
1answer
292 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
121 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
270 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
91 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
239 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
328 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
205 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
593 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
356 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
1answer
40 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
228 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
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 ...
0
votes
1answer
27 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
685 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
232 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
314 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
643 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
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 ...
0
votes
2answers
139 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
514 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
1k 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(); ...