Questions tagged [upsert]

All queries related to Upsert can be grouped under this Tag

Filter by
Sorted by
Tagged with
1
vote
0answers
559 views

Insert and/or Upsert not working

I've created two different classes, each writing to a different homebrew table and I'm not having any problem inserting in one of them, but I can't seem to get the other class to insert records into ...
1
vote
0answers
18 views

Api Upsert by one of two admins overwrites the other admin's record instead of creating a duplicate

I have an org with two admins: AdminA and AdminB. AdminA upserts a record with an external ID - this creates a new record AdminB upserts the same record with the same external ID. I would expect ...
1
vote
2answers
306 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 ...
1
vote
0answers
42 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 ...
1
vote
0answers
98 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
436 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
222 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. ...
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
366 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 ...
1
vote
1answer
745 views

How do I insert a list of related line items in apex?

I am creating a visualforce page and a custom apex class for a page that allows users to convert opportunities and opportunity line items into service contracts and contract line items. I've got all ...
1
vote
2answers
546 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
2answers
4k 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 ...
0
votes
1answer
370 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
3answers
8k views

how to make upsert work instead of insert creating new duplicate record.?

My Object Test__c has two lookup Emp__c - 1st lookup Score__c -2nd lookup I have populated all the value. upsert (new Test__c(emp__c = 'XXXX',score__c = '123')); upsert (new Test__c(emp__c = 'XXXX'...
0
votes
4answers
255 views

Upsert Operation

I already have the data available in our salesforce org. Now I have new excel files coming in which has update to existing records and some new records. We have to upload these into org. I am thinking ...
0
votes
2answers
3k views

How to insert (upsert) an object that has no external id?

According to this documentation, you need to know the external ID field of an object to inset new records. For some of my custom objects, I'm not seeing any fields in the object description that have ...
0
votes
1answer
77 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
863 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
2answers
1k views

Salesforce REST upsert for externalId cause DUPLICATE_VALUE error

I send next upsert request to Salesforce: PATCH /services/data/v41.0/sobjects/Task/uuid__c/a22ac4d6-e2c0-4e53-898d-ea1d0c807775 HTTP/1.1 Host: **********.my.salesforce.com Content-Type: application/...
0
votes
1answer
297 views

UpsertResult isCreated is not working

I am having issues with Upserting data. Here is my code: global static void MyMethod(string param1, string objName, string param2) { CustomObject__c record = new CustomObject__c(); record....
0
votes
1answer
1k views

Avoid Duplicate Id in a List

i have developed one visualforce page and it has multiple Group with Product and Bundle so, once user insert multiple Group with the Same product and same bundle then it's giving me an error as ...
0
votes
1answer
87 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
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
2answers
59 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
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
2answers
140 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 = ...
0
votes
2answers
5k views

How many records can UPSERT add or update in single request in salesforce..?

My question is if i want to insert 20,000 records and i choose to use UPSERT because it contain both insert and update. my data is going to be updated every day. is it true that UPSERT can only create ...
0
votes
1answer
434 views

Pre-populate text field in cloudpages form, if left at same value, use that

I've set up a form in Marketing Cloud. It pre-populates the fields from a data extension with people's details, opening the form with http://web.form.com/updatepref?PID=pidgoeshere It populates ...
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 ...
0
votes
1answer
316 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
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
1answer
597 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 ...
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
230 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 = "...
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
690 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 ...
0
votes
1answer
22 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
536 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 ...
0
votes
1answer
199 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
3answers
586 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 ...
0
votes
1answer
496 views

SalesForce SOA Integration : Best practise to handle values to null

My SFDC org has been integrated with MDM via Oracle SOA. Lately we are seeing issues where data going from value to nulls. When MDM does not have a value in a field then they are not publishing XML ...
0
votes
1answer
282 views

Performing an Upsert in PageReferenceSave - Not updating Item.ID for Use In UnitTest

I have a test that creates a new record in our custom table - Service Offered. Whe I call my controller and save - It creates/updates the record correctly, and in my class the Debug.Assert gives me ...
0
votes
1answer
645 views

Unable to upsert a value from <apex:inputtext>

UPDATE. Unable to upsert!! I modified the code in the previous post. Here's the original one.... public class dataTableCon { public List fb; public List<Feedback__c> getAccounts() { fb= [...
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
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
40 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
1answer
158 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 ...
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 ...