NetSuite Internal ID Lookup Worksheet
NetSuite internal IDs are numbers assigned per account, so the ID for the same subsidiary, location or saved search can differ between sandbox and production. This worksheet gives your team one place to record them with the script ID that stays stable.
| Object | Record type | Production internal ID | Sandbox internal ID | Script ID or external ID | Used in | Last verified | |
|---|---|---|---|---|---|---|---|
Internal IDs often differ between sandbox and production, especially after a sandbox refresh, so record both and look up values at runtime where possible. To see internal IDs in the UI, enable Show Internal IDs in Home > Set Preferences > General (Advanced). Script IDs are stable across accounts and are the safer reference when available.
NetSuite environment audit
Optional review of sandbox and production mappings and hardcoded IDs in your customizations.
Optional. The tool and every export work without this. No spam.
How to use the worksheet
Add a row for every object your scripts, integrations or imports reference by ID. Record the production and sandbox internal IDs, the script ID or external ID, where it is used and when you last verified it. Export to Excel to share with the team or attach to a release checklist, and review the sheet after every sandbox refresh.
Internal ID, script ID and external ID
The internal ID is a number NetSuite assigns when a record is created and it is the default key in the UI URL and in most APIs. A script ID is a text identifier such as custbody_credit_hold that you define for customization objects, and it moves with the SuiteCloud project. An external ID is a value you supply, often from another system, which REST and SOAP can use to address records. Each solves a different problem.
- Internal ID: account-specific, shown with Show Internal IDs
- Script ID: stable across accounts for custom objects
- External ID: your own key for upserts and integrations
- Prefer lookups at runtime over hardcoded numbers
Where hardcoded IDs go wrong
A script that hardcodes a location ID passes in sandbox and fails in production when the numbers differ. The same happens after a sandbox refresh that renumbers newly created records. Safer patterns include loading values from a custom record or script parameter, querying by name or script ID at runtime, and keeping a mapping record that integrations read. This worksheet documents the exceptions you could not avoid.
Common mistakes
Teams often copy IDs from the sandbox into production code, rely on custom list value IDs that are reassigned when a list is rebuilt, and never record the verification date. Review the sheet during release planning and remove rows when the code no longer depends on them. Keep it in version control or a shared drive with a named owner.
Frequently Asked Questions
How do I find a record's internal ID in NetSuite?
Open the record and read the id parameter in the browser URL, or enable Show Internal IDs under Set Preferences, General, Advanced to see IDs in lists and field help. Script and saved search IDs appear on their definition pages.
Are internal IDs the same in sandbox and production?
Not reliably. A sandbox refresh copies production at that moment, but records created afterwards get different IDs in each account. Do not assume matching numbers for anything created after the refresh.
What is the difference between internal ID and external ID?
The internal ID is assigned by NetSuite and unique within the account for the record type. The external ID is a value you provide, usually mirroring another system, and it lets integrations find or upsert records without storing NetSuite numbers.
Should I hardcode internal IDs in scripts?
Avoid it. Use script parameters, a configuration record, or look up by a stable key at runtime. If you must hardcode, document it here and verify after each sandbox refresh and deployment.
If you manage many NetSuite environments and mappings, Netray can help automate configuration drift checks across accounts, read-only by default.
Related Tools
NetSuite REST Record API URL Builder
Generate correct REST web services URLs and sample calls for a NetSuite record, a record list, a SuiteQL query or the metadata catalog.
NetSuiteSuiteQL Query Generator
Fill in a table, columns, filter and sort and get a SuiteQL statement ready for the N/query module, the REST SuiteQL endpoint or the SuiteAnalytics Workbook.
NetSuiteSuiteScript 2.1 User Event Script Skeleton
A copy-ready SuiteScript 2.1 user event script with the JSDoc annotations, entry points, context checks and error logging you need to start.
NetSuiteNetSuite SuiteTalk SOAP to REST Migration Checklist
A step-by-step checklist for replacing SOAP calls with REST record and SuiteQL calls, from inventory to cutover and rollback.
More NetSuite tools
See all- NetSuite Saved Search Formula Generator
- NetSuite CSV Import Template Guide
- NetSuite Role Permission Matrix Worksheet
- NetSuite Inventory Costing Method Reference
- NetSuite Month End Close Checklist
- NetSuite License Cost Estimator
- NetSuite User Access Request Form Template
- NetSuite Custom Record Design Spec Template
- NetSuite SuiteScript Deployment Handover Template