What is External ID in NetSuite?
The NetSuite external ID attribute of a RecordRef provides a means to reference an object by its foreign key in an external database. You can set the external ID attribute during an add or update operation. In addition, External IDs are useful in maintaining client ID relationships and establishing relationships during a single import operation
How to Update External IDs in NetSuite
[The following is a transcription of the video]
As you know, an External ID would be used in NetSuite to associate a record with an external system—either a payroll system or another method outside of NetSuite. So, you’d use your external ID in NetSuite to connect to the ID that’s within that external system. We have a client that’s made extensive use of their external IDs, and they use their external IDs for employee records, location, and Department records. The problem was if the client would create a new record and location. When they create the new site, there’s no easy way to enter the External ID Therefore, it would not get entered in which would cause problems with other processes that we have.
So, the only way to use NetSuite to enter an External ID is with a CSV import. You would have to export the data and create a CSV file. You can see the External ID or update the external IDs, save the CSV file, and then go in and create an import template to go through the import process. It’s a complex process and a little tedious. Therefore, most NetSuite Consultants are doing a safe search to show the External ID. The next step up from there is if you want to see the External ID on the actual location form.
Most NetSuite consultants know how to go in and create a custom record to display the External ID on the record. You create an email and another record field, the record type location, give it a label, give it your ID 34, and text that you’re not storing the value. Can your default team value using a formula to External ID?
Let’s get you to this point where you can view the record but if you go in and try to update it, say I want to save the record. Of course, there’s no way to do it. After having a few issues with the client and the External ID not being added, I reached out to one of our senior sweet script developers and explained the problem. Then, within a few hours, I had a working script that would update the External ID for the location records. We have our own team of in-house developers; Therefore, it’s very easy for us to reach out to our developers, explain the problem in detail, and get a working script in the client sandbox to test and demonstrate to the client how it works. With approval, we can move all those scripts into their production environment and custom fields, and then they will have a working functional script. The client has been pleased using the scripts to update their external IDs over the last year.
One thing to note is as of this recording in July of 2023, this script does work. However, NetSuite in the future could put up some type of blocks to the code and not allow this functionality. I can show you an image of the script to show you what we’re using. I have blurred out the functionality so that it cannot be duplicated. This is a very complex script, and everything must be exact between the script and the custom fields. It really should be done by a professional. We don’t want somebody to try and grab a screengrab of our script off this video and try to implement it. That would be very problematic.
You also need a separate script for each record type. Whether it’s an employee or location, it needs a separate script. Department or other records would have their own separate script as well. It can be quite challenging to get all that set up. As you see here, this record type is specific to location. Therefore, that’s just the job status.
Now I can deploy the script. I had our test script in here, and I just turned it off to show you how it does not work or how NetSuite would work typically work without the script. I’m deploying the script in test mode. So now, if I go back to the location and edit it, I want to make the External ID 887. I’ll add it and save the record. And as you see now it’s been saved 887. If we go back out here to the list and press refresh, it now shows as 887 and says we have production. Since we have the script in here we want to add an external ID for this production location. This location, External ID is 999.
Wrapping Up
As a highly accredited NetSuite Solution Provider, ScaleNorth is well positioned to help you with the full scope of your NetSuite customization needs. If you require more NetSuite assistance, contact ScaleNorth today.
About the Author
Chris Emory is a versatile and accomplished IT professional with 20 years of experience in information systems and functional consulting. Chris has a wealth of experience as a NetSuite Expert and holds the NetSuite Administrator and SuiteFoundation credentials.