How to Fetch and Store External ID of NetSuite Records


One of our clients in the field of self-service retail had a custom requirement in their NetSuite software. They wanted to set up external IDs inside their records.   

This case study details how developers at Jobin & Jismi provided a solution to the client.  


One uses External IDs in NetSuite for integration or import/export purposes. By default, NetSuite does not allow External IDs in records.    

But our client wanted external IDs in the following records:    

• Item records 

• Supply chain 

• Location 

• E-store record (custom)


Whenever NetSuite creates or edits a required record, our client desired the generation of an external ID. 

Our client wanted these requirements to be applies to selected records and users which they had nominated.  


Normally, NetSuite does not allow the creation of a record with the same name. But this is not applicable in case of a custom record.  

Here a custom record called “Estore record” posed a challenge during the execution. Since this is a custom record it does not fetch values from the name field and NetSuite does not intervene. Therefore chances of having a duplicate record with the same name was highly possible.  


The Item, Supply Chain, Location and E-Store records have field names. These field names also contain an external ID. Using this ID, one can fetch the values in the name fields.  

This can set up external IDs for that record. Our experts used the script to fetch this value. The system generates the field value as an external ID automatically. This action occurs whenever someone creates or edits the record. 

The system sends an email to the record creator with a message of invalid/ non-unique external ID set. This happens while creating or editing any of the records with the name that already exists. Thus we can confirm that the external id is unique for each record.  


The client was satisfied with our solution. It allowed them to generate an External ID for their selected roles and records.  

The solution also eliminated the risk of duplication. 

Contact Jobin & Jismi if you have similar custom requirements.