Wednesday, January 22, 2014

What is the difference between External ID and Unique ID

What is the difference between External ID and Unique ID

When importing custom objects, solutions, or person accounts, you can use external IDs to prevent duplicate records from being created as a result of the import operation.
An external ID is a custom field that has the 3External ID ́ attribute, meaning that it contains unique record identifiers from a system outside of Salesforce. When you select this option, the import wizard will detect existing records in Salesforce that have the same external ID. Note that this operation is not case-sensitive - for example, 3ABC ́ will be matched with 3abc ́. However, there is an exception: if the custom field has the separate 3Unique ́ attribute and the case-sensitive option for that attribute is selected, uppercase and lowercase letters will not be considered identical.
Ans:
External ID
This is a field that usually references an ID while importing 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.

Additionally, if you have an external ID field, the field becomes searchable in the sidebar search. You also can use the upsert API call with the extenal ID to refer to records.

You can have multiple records with the same external ID (though it is not reccomended, as it will defeat the purpose of the external id) .

External Id is a custom field and available for Text, Number and Email field types.

External Id is used in upsert operations.

If external id is absent or not matched then insert happens.
If external id matched once then record will be updated.
If external id is matched multiple times then error occurs.

Unique ID field

This is a setting for the field that will prevent you from using the same value in multiple records for the unique field. So if I create a 5 character text field and make it unique, and I create a record with the value 12345 i will not be able to create another record with that same value in the unique field. If i try to do so, I will get an error saying that the value is already in use.

Often, External Ids are set with the unique property so that the IDs will be unique to each record.

alesforce - External Id option while creating field

No comments:

Post a Comment