ANS-0421 · SUITESCRIPT DEVELOPMENT
Loading Generic Record Types for Entities and Inventory Items in NetSuite
Learn how to efficiently load related record types like Leads, Prospects, and various inventory items using generic record types in SuiteScript.
Short answer
In NetSuite SuiteScript, 'customer' can generically load customer, lead, or prospect records. Similarly, 'assemblyitem' can load its lot-numbered or serialized variants. For 'inventoryitem', while it supports loading serializedinventoryitem, its ability to consistently load lotnumberedinventoryitem using the generic 'inventoryitem' type may be inconsistent or fail based on recent user reports.
Scenario
NetSuite developers often encounter situations where they need to load records that share a common base type but have specific subtypes, such as Leads, Prospects, and Customers, or different types of inventory items (standard, lot-numbered, serialized). Determining the exact subtype before loading can add unnecessary complexity to SuiteScript.
Solution
When working with entity records that may be a Lead, Prospect, or Customer, it is not necessary to attempt to load each as a separate record type. Loading 'customer' is generic and allows for the loading of customer, lead, and prospect type records. Similarly, 'assemblyitem' allows the loading of lotnumberedassemblyitem and serializedassemblyitem. For 'inventoryitem', while it supports loading serializedinventoryitem, its ability to consistently load lotnumberedinventoryitem using the generic 'inventoryitem' type may be inconsistent or fail based on recent user reports.
Expert NetSuite Support
Need help with this NetSuite issue?
SuiteScript Development consulting and configuration support
