ANS-0404 · SUITESCRIPT DEVELOPMENT

How to Handle NetSuite ‘Company’ Records in Scripting and Saved Searches

Understand the distinctions between NetSuite's 'Company' record type and scriptable entities like 'Customer' or 'Other Name' records to avoid scripting limitations.

Short answer

NetSuite's generic 'Company' record type, while visible in the UI, is not directly usable or searchable via scripting. It is not recognized as a valid record type for script-based operations. Instead, focus on scriptable entity types such as 'Customer' or 'Other Name' records for saved searches and data manipulation within scripts.

Scenario

Users attempting to load a saved search for NetSuite's generic 'Company' record type in scripting may encounter difficulties. Despite its presence in the user interface and its use in various NetSuite fields, this record type is not directly recognized as a valid entity for script-based operations. This can lead to confusion, especially when 'Company' and 'Customer' records are similarly named in the UI.

Solution

NetSuite maintains a distinction between a generic 'Company' record and specific entity types such as 'Customer' or 'Other Name'.The 'Customer' record is a standard entity type that is fully searchable and scriptable within NetSuite.The generic 'Company' record, while utilized in 'Company' fields across various NetSuite records and searchable through the user interface, is not recognized as a valid record type for direct use in scripting. It is not listed as a distinct scriptable type in the NetSuite Records Browser.Consequently, it is advised not to attempt to work with the generic 'Company' saved search or record type directly in scripting. Despite its visibility in the UI, it does not function as a standalone, scriptable record. For script-based operations and saved searches, focus on utilizing 'Customer' or 'Other Name' records, which are fully supported.

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant