+ Start a Discussion
RagsehRagseh 

Standard Name field as External ID

Hi All,

Is possible to use standard NAME field (data type is AutoNumber) as external ID while upserting/updating records using enterprice API.....
 
Dutta SouravDutta Sourav

Hi Ragesh,

The dataype for creating External Id's are Text, EMail & Number. AutoNumber won't work here..

KaranrajKaranraj
Ragseh - 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. This is a field that usually references an ID from another (external) system. For instance, if the customer has an Oracle Financials system that they will be linking with salesforce.com, it may be easier for them to be able to refer to the Oracle ID of account records from within salesforce. So they would create an external ID in salesforce.com and they would load the Oracle ID into that field for each account. They can then refer to that ID field, rather than the salesforce.com id. 

Currently you can't make standard field as External Id field in salesforce, vote for this Idea Allow External ID functionality on Standard fields  (https://success.salesforce.com/ideaView?id=08730000000BpVJAA0)

Thanks,
Karanraj
 
RagsehRagseh
Hi Karanraj/Sourav..
Thanks for your reply.... I wil vote for the idea..

My requirement is .. Salesforce is the source system of data transfer  and data has transfered to SAP. Need to update few fields of these records again in salesforce after some business process in SAP. Unfortunatly we are not passing the salesforce ID to SAP,so only way to uniquely identify the record is NAME field (and it is autonumber).......
Vasile@Vasile@

Hi @Ragseh, I was investigating a current integration and found out that either fields with the external ID field attribute for custom objects or the idLookup field property for standard objects can be used in upsert operations. The Name (AutoNumber) fields usually have the idLookup property enabled. This is how you can check the idLookup property running this script in the developer console: 

/* Fetching all the fields of the SObject */
Map<String, Schema.SObjectField> fieldMap = Schema.getGlobalDescribe().get('Contract').getDescribe().fields.getMap();

/* Accessing writable and accessible fields from map */
for (Schema.SObjectField objectField : fieldMap.values())
{
    Schema.DescribeFieldResult objectFieldResult = objectField.getDescribe();
    System.debug('Fields with IdLookup property found: ');
    
    if (objectFieldResult.isIdLookup()) {
        System.debug('Field API --> '+objectFieldResult.getName());
    }
}

Sangeeta Patra 11Sangeeta Patra 11
Hi,

For each object that can have custom fields, you can set up to 25 custom auto-number, email, number, or text fields as external IDs. Standard fields are not included as of now. Idea has been created to implement this functionality.
​​​​​​​
https://trailblazer.salesforce.com/ideaView?id=08730000000BpVJAA0
Chaitanya WalukarChaitanya Walukar
No, we cannot use Standard Field as External Id in salesforce. also we can use only 4 data type fields as an external id fields as listed below
1 number
2 auto - number
3. text
4. email  

if you have an any further query dont hesitate to ask