How to Update Records using External ID in Salesforce

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.

How to update records using external id in salesforce
How to update records using external id in salesforce

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.

How to update records using external id in salesforce lightning
How to update records using external id in salesforce lightning

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.

 Update records using an external id in salesforce lightning
Select the 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.

Update record using an external id in salesforce
update the existing 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.

Update records using an external id in salesforce fields and relationship
Select fields and relationship

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.

Update records using an external id in salesforce edits
Click 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.

Update records using an external id in salesforce checkbox
Select the checkbox

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).

update records using an external id in salesforce external id
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.

Update records using an external id in Salesforce csv file
Choose the CSV file

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.

Update records using an external id in Salesforce map
Map the object

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.

update records using an external id in Salesforce map student
Click on the map option

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

Update records using an external id in Salesforce start importing
Review and start importing

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

Update records using an external id in Salesforce click ok
click on the ok option

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.

Update records using an external id in the Salesforce
records are updated using an external id in the Salesforce

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.

How to update records using external id in salesforce classic
How to update records using external id in salesforce classic

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.

How to update records using an external id in salesforce classic
How to update records using an external id in salesforce classic

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.

Update records using an external id in salesforce classic object
Click on the expenses object

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.

Salesforce classic update records using external id
Edit the field and relationships

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.

Salesforce classic update records using an external id
Click on the checkbox

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).

Update records using an external id in the salesforce classic
update the existing records

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.

Salesforce classic update the records using an external id
Select the CSV file

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.

Salesforce update records using the external id
Map your fields

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

Salesforce update records using an external id start importing
Click on start importing

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.

Update records using an external id field in salesforce classic
The external field is updated

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.

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