In the Salesforce tutorial, I will explain How to Update Records using External ID in Salesforce
External ID is defined as a custom field that has an external id attribute which means it holds different record identifiers outside the salesforce. The external ids can be used to avoid duplicate records.
So, here we will discuss these topics in this Salesforce tutorial:
- What is the external id in Salesforce?
- Why do we use an external id in Salesforce
- How to update records using an external id in Salesforce
- How to update records using an external id in Salesforce lightning
- How to update records using an external id in Salesforce Classic
What is the external id in Salesforce?
In Salesforce external id is basically a custom field that we marked as unique in order to identify the records uniquely while the data is coming from an external source.
This field mainly refers to an id from another system when the field is checked as internal then automatically the field will be indexed.
For the external id, the field type should be any one of the numbers, auto-number, email, and text. An object can only have seven external field ids.
Custom fields marked as unique also count against an object limit of seven external ids fields.
So, with this, we learned What are external ids in Salesforce. Further, we will understand why we use an external id in salesforce.
Why do we use an external id in Salesforce?
The external id in salesforce frequently produces with unique id so that’s why the external id should be unique to every record.
When we are importing the custom object under the data import wizard then the external id is used to avoid the import from creating duplicate records. External id is a custom field that has an external id attribute and which we marked as unique in order to identify the records uniquely while the data is coming from an external source.
The upset call method is used to match against the external id fields during importing the external source.
Read: How to create profile in Salesforce
How to update records using an external id in Salesforce
Here we are updating the records using an external id in Salesforce. If you want to learn how to update records using an external id in salesforce follow these steps:
- Login into to salesforce account, and click on the setup.
- After clicking on the setup click on the fields of the desired object. That you are previously created or newly created.
- After selecting the object, click on fields and select the field which has data type any one of the numbers, auto-number, email, and text. Click on the edit option.
- Select the checkbox Select Unique: ” Do not allow duplicate values and also check the checkbox Select External ID: Select this field has a unique record identifier from an external system.
- After clicking on all the checkboxes click on the save option.
Now, let’s move ahead and see how to update records using an external id in Salesforce. We will explore both the salesforce experiences: Salesforce lightning and Salesforce Classic.
Read: Create community in Salesforce Lightning
How to update records using an external id in Salesforce lightning
Here we are updating records using an external id in salesforce lightning. If you want to learn how to update records using an external id in salesforce lightning follow these steps:
Step-1: Firstly, go to the setup, enter the Data import wizard in the Quick Find box, and then select the Data Import Wizard option.

Step-2:After selecting the Data import wizard click on the launch wizard option that is present inside the import your data in easy steps.

Step-3: After clicking on the launch wizard option, import your data into the salesforce page is open. Select the custom object. Here we are clicking on the USA Students custom object.

Step-4: After selecting the custom object then update the existing records and you can see that in the match by coloum, there is only two item name and Salesforce.com ID there is no external id from which we can match our records.

Step-5: For adding the external id in the match by column, select the custom object. Here we are selecting the USA Student object and then clicking on the field and relationships.

Step-6: After selecting the field and relationships click on the field which you want to make as an external id. Here we are selecting the student email field and clicking on the edit option.

Step-7: After clicking on the edit option, go to the general options section and select the unique and external id checkbox, and click on save.

Step-8: Now again go to setup and enter the data import wizard in the quick find box and after that click on the launch option after that the import your data page is open again.
Now again select the USA Student object then click on update existing records and after that click on a match by option this time you can see that the three option is visible in the list. The first is name, the second is salesforce.com ID and the third is Student email(External ID).

Step-9: Select the student email(external ID) option from the match by and then choose the CSV file to update the records using an external id after that click on the next option.

Step-10: Edit the field mapping of the USA Student object. Click on the map option that is present under the edit column and map the student name.

Step-11: After clicking on the map option the map your field dialogue box is open now select the field from which we can map our object and click on the map button.

Step-12: After mapping the object we can review the import information. After reviewing the information click on the start import option.

Step-13: After importing the information congratulation dialogue box is open. Click on the ok button.

Step-14: After clicking on the on button the bulk data load jobs page is open inside which we can see that the external id field is present.

In this way, we have learned how to update records using an external id in salesforce lightning.
Read: How to create community user in Salesforce
How to update records using an external id in Salesforce Classic
Here we are updating records using an external id in salesforce classic. If you want to learn how to update records using an external id in salesforce classic follow these steps:
Step-1: Firstly, click on the setup and then enter the data import wizard in the Quick Find Box after that select the data import wizard.

Step-2: After selecting the Data import wizard click on the launch wizard option that is present inside the import your data in easy steps.

Step-3: After selecting the custom object then update the existing records and you can see that in the match by coloum, there is only two item name and Salesforce.com ID there is no external id from which we can match our records.

Step-4: For adding the external id in the match by column, select the custom object. Here we are selecting the Expense object and then clicking on the field and relationships.
After selecting the field and relationships click on the field which you want to make as an external id. Here we are selecting the amount and clicking on the edit option.

Step-5: After clicking on the edit option, go to the general options section and select the unique and external id checkbox, and click on save.

Step-6: Now again go to setup and enter the data import wizard in the quick find box and after that click on the launch option after that the import your data page is open again.
Now again select the Expense object then click on update existing records and after that click on a match by option this time you can see that the three option is visible in the list. The first one is name, the second one is salesforce.com ID and the third one is Amount(External ID).

Step-7: Select the amount(external ID) option from the match by and then choose the CSV file to update the records using an external id after that click on the next option.

Step-8: Edit the field mapping of the expense object. Click on the map option that is present under the edit column and map the seller Details.
After clicking on the map option the map your field dialogue box is open now select the field from which we can map our object and click on the map button.

Step-9: After mapping the object we can review the import information. After reviewing the information click on the start import option.

Step-10: After importing the information congratulation dialogue box is open. Click on the ok button.
After clicking on the button the bulk data load jobs page is open inside which we can see that the external id field is present.

This is how we can understand how to update records using an external id in salesforce classic.
You may also like to read the following Salesforce tutorials.
- How to create a user in Salesforce
- Contact List View Salesforce
- Create list view for queue in Salesforce
- How to Mass Transfer Records in Salesforce
Conclusion
In this Salesforce tutorial, we have learned how to update records using an external id in salesforce. This can be performed on both salesforce lightning and salesforce classic.
- What is the external id in Salesforce?
- Why do we use an external id in Salesforce
- How to update records using an external id in Salesforce
- How to update records using an external id in Salesforce lightning
- How to update records using an external id in Salesforce Classic
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.