Questions tagged [externalid]

An external ID is a custom field that has the “External ID” attribute, meaning that it contains unique record identifiers from a system outside of Salesforce.

Filter by
Sorted by
Tagged with
1 vote
2 answers
71 views

Upsert Product2 by ExternalId field fails with a strange error

I have read the documentation about ExternalId field on Product2 standard object ExternalId Type: string Properties: Create, Filter, Group, Nillable, Sort, Update Description: The unique identifier ...
Patlatus's user avatar
  • 16.1k
0 votes
1 answer
52 views

Using Clone() and setting external Id

I'm trying to clone a Case and modify a lookup using an external ID before inserting. The problem is that I have this error: System.DmlException: Insert failed. First exception on row 0; first error: ...
Julien Souchi's user avatar
0 votes
1 answer
417 views

Composite API to delete multiple records by an external id

I have been looking for an example of what @sfdcfox suggested for this thread https://salesforce.stackexchange.com/a/332678/133263 "The first subsequent would be a get, the second the delete call&...
Lena Razov's user avatar
-1 votes
2 answers
136 views

Bulk update of custom field value in salesforce object failing due to custom validations and triggers

I added a custom field to opportunity salesforce object. It's name is externalId__c. The field is added to the object. However when I am trying to update the value of externalId__c for all the records,...
Chitvan Mishra's user avatar
0 votes
1 answer
93 views

Post request with polymorphic field on the body

I am trying to send a post request to ContentVersion to migrate my contentVersions from point A to B : i build the body like this : body = ('{"Title" :"'+Title+'", &...
Amir Bouzid's user avatar
0 votes
1 answer
357 views

Duplicate Error on Upsert

I have created an operation in Jitterbit to run an upsert on two custom objects and one standard object: Lead, Project_c and ProjectLead_c The ProjectLead object is just a junction object that relates ...
Milan Stegnjaic's user avatar
1 vote
0 answers
396 views

What is a reified column and how to get all value from it?

There are some objects (like FieldDefinition or AppTabMember) that when you want to uses SOSL SELECT all data from them, it fails with "a filter on a reified column is required". I have a ...
Frederic Lachasse's user avatar
0 votes
2 answers
276 views

Clear a Lookup Field in an upsert call through Rest API

We're building an interface to upsert records into a Custom Object through Rest API. We're building the relationship to other records through external Ids, so we're using the following json structure: ...
Chris.Walz's user avatar
2 votes
1 answer
2k views

How to Create Record from LWC using External Id in lookup fields

I'm trying to create an object in LWC, without using Apex. So I found out that we can do that with CreateRecord from uiRecordApi : But I'm trying to create a Custom Object (ClientMember__c in our ...
Yaac0's user avatar
  • 155
1 vote
1 answer
458 views

How to connect an external id to another record using apex

I currently have a situation where new contacts are created with the chance of creating duplicates. The existing contacts have an external id. Since it is not possible to merge external ids with ...
Thomas's user avatar
  • 2,294
0 votes
0 answers
1k views

MALFORMED_ID Error during integration

We have a custom object called "Activity" with 2 lookup fields and an external ID. The 2 lookup fields are Contact and Course. The Contact object contains "contact ID" as the ...
user78286's user avatar
0 votes
1 answer
298 views

Way to migrate data in bulk which reference record types

Record Type standard object lacks Unique External Id field and doesn't allow to create a custom Unique External Id field, which brings a challenge to migrate data in bulk which reference record types, ...
Patlatus's user avatar
  • 16.1k
0 votes
1 answer
574 views

External ID not searchable in Global Search

We have a custom object (allow search = true) with a tab default on in a sandbox where there is an External ID field on which we'd like to perform search. When searching on it, nothing is displayed ...
Gauthier's user avatar
2 votes
1 answer
3k views

Update (never insert) a record by External Id using REST API

Salesforce offers a way to upsert a record by a given External Id: curl https://na1.salesforce.com/services/data/v20.0/sobjects/Account/customExtIdField__c/11999 -H "Authorization: Bearer token&...
mmm321321's user avatar
  • 639
4 votes
1 answer
903 views

Rest API - Set polymorphic Lookup with external Id

I am wondering If it is possible to set a polymorphic lookup value with external Id with Rest API. I didn't find any documentation on this and it does work for me. Here I am trying to set the lookup ...
Raphael D's user avatar
  • 534
0 votes
2 answers
108 views

Fetch all records matching a repeating ExternalID [closed]

I have a non-unique custom field which is an ExternalID. Is it possible to fetch all records matching a given value using the REST API? The documentation example shows the API returns one record. ...
ishan3243's user avatar
  • 111
0 votes
1 answer
926 views

Can we create an indexed field which is not unique

I am extremely new to salesforce. I read that we can mark any custom field as an ExternalID which creates an index over it. I have a use-case where I have multiple Address records which have the same ...
ishan3243's user avatar
  • 111
0 votes
1 answer
1k views

Difference between Upsert and Update database methods

Good morning. Database.update (fields , allOrNothing) Database.upsert (fields, externalId, allOrNothing) I need help to understand why the second parameter "externalId" is not necessary on ...
LatDu's user avatar
  • 49
3 votes
0 answers
141 views

UPSERT REST Api creates new record because of space(%20) urlencoding

I'm currently trying to use the salesforce UPSERT endpoint. The ExternalId that I'm using contains a space, like so: North America_12345 so my URL looks like: /services/data/v49.0/sobjects/...
Luis Valdez's user avatar
0 votes
1 answer
296 views

Upsert not working in apex class

I have two object temp__c and NFSave___c. I am dumping all the data in temp object through data loader in rich text area field(Section__c). Then I am sending the data with apex class from Section ...
sfdc developer's user avatar
-2 votes
1 answer
44 views

Check if upsert necessary

I am using external id and rest callout to another org, but is there a way to check if i need to make callout? Cause callout called even if all fields are the same. I can compare all fields, but its a ...
Femladamli's user avatar
-2 votes
1 answer
548 views

How to retrieve all external id fields of account object?

I have a class public static List<AccFieldWrapper> AcctFields(String Account){ Map <String,Schema.SObjectType> mapobject = Schema.getGlobalDescribe(); Schema....
Teshu's user avatar
  • 1
0 votes
1 answer
1k views

Workbench upsert: how to use an External id?

I want to update a number of Cases using a CSV file that contains two fields: case number (NOT technical id, but the automatically generated human readable id/name) and a textual complaint. Data ...
Sander de Jong's user avatar
0 votes
1 answer
205 views

Why ExternalID field of parent Account is null?

I have the next code on my test Class: parentAcc.ExternalId = '001'; insert parentAcc; System.debug('parentAcc ExternalId' + parentAcc.ExternalId); childAccount.ParentId = parentAcc.id; insert ...
CPS's user avatar
  • 335
0 votes
0 answers
595 views

External Id a standard field on Custom Objects

I am writing a data migration project to take data from an external system and map it into SFDC as a hierarchical structure of custom objects using the Bulk Api 2. The pattern is as follows: Insert ...
Mike Sowerbutts's user avatar
1 vote
2 answers
670 views

Is it possible to make a single API request which deletes multiple records using external id without creating a custom rest resource?

Let's say I have an external identifier field Account.External_Id__c. I have a web application which has the values for this field and needs to delete multiple records, (e.g. "Abc123", "...
Brian Kessler's user avatar
0 votes
2 answers
315 views

Update both Pricebook2 and PricebookEntry objects using just one for loop

Having the next code: for (WrapperTest pb : pbs_lst) { Pricebook2 newPB2 = new Pricebook2(); PricebookEntry newPBE = ...
CPS's user avatar
  • 335
0 votes
1 answer
32 views

Understand token expiry for Connected APP using JWT authentication

The session expiry for an accessToken can be configured at org level, profile level, connected app level. When authenticating via private key certificate using the JWT OAuth Flow, which session expiry ...
Edmondo's user avatar
  • 1,702
2 votes
1 answer
1k views

DUPLICATE_VALUE error - Composite REST API by External Id

I'm trying to upsert a record using an external Id with composite API. my external Id is (External ID) (Unique Case Insensitive) - to be precise - I created this field only with the external Id ...
Salvation's user avatar
  • 1,147
0 votes
1 answer
676 views

Update child record based on parent external id

I have two custom objects, the Rate Cards and the Rate Card Lines. What i need to do is to create rate card and rate card line records by deserializing two json files(one for the rate cards and one ...
Xrhstos Kolonis's user avatar
0 votes
1 answer
736 views

Upsert without an external Id

We have external system that is pushing an event using Platform events saying that an asset is changed. I have created a Platform event object and a trigger on it, make a webservice callout to get ...
Balaji Pooruli's user avatar
2 votes
1 answer
258 views

Set Packaged Custom Field as External Id After Initial Deployment

I've been struggling to find a definitive answer as I've seen contradictory information. In our managed package we have a custom field that we want to make an External Id, but is this possible at all, ...
aaron's user avatar
  • 855
3 votes
1 answer
1k views

Reference lookup external Id when inserting records in composite API call

I am trying to insert standard Account records at the same time as child records (designed by relation Related_Person_Account_Relations__r). I am using the Composite tree Account endpoint (/services/...
Pierrot's user avatar
  • 73
1 vote
0 answers
51 views

Get RecordID based on ExternalID

I always stumble upon this situation - I have csv file with 200 records and each record has an ExternalId. These records may or may not exist in Salesforce. In Salesforce I have an ExternalID field. ...
GroundToCloud's user avatar
0 votes
2 answers
942 views

Why use autonumber as external id [closed]

I can't figure out why use autonumber as External ID. There is some case when must be used an auto number as ExternalID? Thanks
DevOps85's user avatar
0 votes
1 answer
520 views

Error when trying to Update using nforce to Product2 object

I am trying to update a custom field on the Product2 object, namely S3_Image__c - it is a URL field, linking to an image on AWS S3. Now, I've basically lifted the code from the examples given on the ...
Scott Harrison's user avatar
0 votes
1 answer
592 views

Is there anything we need to check before mark a text field as External Id?

Do we need to check anything in a running org before making a text field as an External Id to avoid Non-selective query against large object type Exception? (Data loss, any apex errors, etc) I have ...
Hariprasath's user avatar
0 votes
1 answer
311 views

Fetch record using External ID with specified fields

I would like to fetch a record over standard REST API via a field marked External ID (like here), but limit my fetched fields to just my required fields (e.g. using the fields parameter here). Is this ...
SFDC Dev 27's user avatar
0 votes
1 answer
1k views

Alternative to making Formula Field as an External ID

I have a custom object which draws an External ID field from its Parent. I created a Formula Field to pull that data in to the custom field. However, I want to use that field on the custom object as ...
GroundToCloud's user avatar
0 votes
1 answer
824 views

Update using External Id

I understand UPDATE operation doesn't support ExternlID. Is there any other way i can use Dataloader to update Salesforce records using external id ? If i use UPSERT operation, i don't want to ...
GroundToCloud's user avatar
0 votes
1 answer
87 views

Trigger : External Id is not Linking Parent and Child

I am trying to build logic to clone Opportunity and all related Product (Custom) when Opportunity is closed won. I am using externalId to link it. It is cloning opportunity but for it is cloning but ...
Sfdc_1184's user avatar
  • 133
0 votes
0 answers
111 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 ...
GroundToCloud's user avatar
0 votes
0 answers
933 views

Dataloader - Upsert Contact and Relate to Account

How can I UPSERT Contact and relate it to the Account ? Data Structure Supplier_ID__c (External Id on Account ) Supplier_AdminID__c (External ID on Contact) Supplier_ID__c (lookup field on ...
GroundToCloud's user avatar
0 votes
1 answer
860 views

Bulk API upsert with both External Id and SFID in JSON

I'm using the Bulk API to upsert records into Salesforce. The Request contains both an External ID and also a Salesforce Id. Even though in the job detail references using the external Id, will ...
Richard Lewis's user avatar
0 votes
0 answers
56 views

SOQL vs Reports: Why is server losing connection when I run equivalent SOQL from Query Editor?

I have a Batch process which accepts 300,000 or so records from its query. When I run the query as a standalone in Query Editor or in Workbench, I get errors (discussed in last post Errors for count() ...
T. Young's user avatar
0 votes
0 answers
404 views

Bad Field Names on Insert Update in Integration (but not on all records in transaction)

Scenario We have an integration that upserts records against Sobject A, C and CO. (I'm using letters to represent for brevity) A - Account C - Contact CO - CustomSobject (junction Sobject between A &...
JetSparx's user avatar
  • 149
1 vote
1 answer
669 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<...
SfdcBat's user avatar
  • 4,761
1 vote
1 answer
1k views

Salesforce Data Loader Cant Upsert Tasks using External Id to link to Account?

I'm trying to Upsert Tasks to their Accounts using an ExternalID field but the 2nd step (Step 2b) doesn't appear with a Task Upsert. Does Task not support External IDs for Account-association? Also,...
Steve's user avatar
  • 55
0 votes
1 answer
2k views

Not being able to query External Object from Trigger

I need to query an external Object from Contact Trigger. If records are present in the external object, then we have to update the contact. Otherwise we have to create the contact. Now, my issue is ...
Madhurima's user avatar
  • 1,265
-1 votes
2 answers
148 views

Dataloader Upserting: the Child overwrites the parent

I'm using Dataloader to Upsert a Child Account to Parent Account using an external ID. When the Upsert is complete, the Child overwrites the parent, it's not not connecting the Child Account to the ...
Steve's user avatar
  • 55