ANS-0793 · SUITESCRIPT DEVELOPMENT

How to Limit NetSuite Sales Order Items by Customer Pre-Authorization

Explore two NetSuite approaches for managing customer-specific pre-authorized items, focusing on custom records and SuiteScript.

Short answer

To restrict items on sales orders and invoices to customer-specific pre-authorized lists, NetSuite offers two main strategies. One involves custom records with item-centric relationships and SuiteScript for dynamic naming and sourcing. The other, though not directly supporting multi-select field sourcing, aims to associate items directly with customer records for streamlined selection.

Scenario

A NetSuite user needs to restrict the items available for selection on Sales Orders and Invoices. The restriction should be based on a pre-authorized list of items specific to each customer, which is currently managed in a custom record. The objective is to dynamically limit item availability whenever the Customer field is changed on a transaction.

Solution

Two primary solutions were identified to address the requirement of limiting items on sales orders and invoices based on customer-specific pre-authorization:

  1. The first proposed solution involved implementing a multi-select field on the customer record. However, it is important to note that current NetSuite functionality does not support direct sourcing of multi-select fields from item records.

  2. The second option involved switching the parent to the Item instead of the Customer and naming an entry (using includeName) after the Item's name. This part would have to be done by script, since the name field must be set as inline and its value set on beforeSubmit from the item. This setup would then allow for sourcing the custom column from this record. Afterwards, a filter would be attached to this custom column to isolate the items which are associated to the Customer.

    Ultimately, the first approach was deemed the most efficient.

Expert NetSuite Support

Need help with this NetSuite issue?

SuiteScript Development consulting and configuration support

Talk to a consultant