Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
0
votes
1answer
522 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....
0
votes
1answer
27 views

How to display the Data extension records on the landing page for upsert the data using AMPscript? [closed]

How to display the data extension record on the landing page to upsert the record. I created a record in the data extension through the landing page using the InsertDE function. But i am unable to ...
0
votes
1answer
26 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
1
vote
1answer
433 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 ...
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 ...
0
votes
0answers
46 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
31 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 ...
4
votes
1answer
857 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, ...
0
votes
2answers
409 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....
4
votes
2answers
3k views

Can I upsert PricebookEntry Records?

Is it possible to upsert PBE records? According to the API document, upsert is a supported function. Now that we can create custom fields on the PBE, I even added an external ID field, but I cannot ...
0
votes
0answers
33 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
42 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
0answers
38 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 ...
0
votes
1answer
131 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. ...
1
vote
1answer
102 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
30 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
14 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
61 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
37 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 ...
1
vote
1answer
519 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
365 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 ...
0
votes
1answer
227 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
42 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
95 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
68 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
55 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
60 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
45 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
94 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
57 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 ...
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
0answers
191 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 ...
0
votes
2answers
207 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
2answers
505 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/...
1
vote
1answer
100 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.
0
votes
0answers
93 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
262 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
113 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
237 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
88 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
237 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 ...
0
votes
1answer
194 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 ...
1
vote
2answers
321 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
576 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 ...
11
votes
6answers
18k 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....
1
vote
2answers
334 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
32 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 ...
1
vote
2answers
600 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 = '...