ANS-1395 · CUSTOM FIELDS, RECORDS & FORMS
How to Dynamically Source a Transaction Column Field Based on a Header Field in NetSuite?
Learn to configure NetSuite Transaction Column Fields with dynamic filters, ensuring accurate item sourcing based on transaction header data.
Short answer
To dynamically source a Transaction Column Field, create a custom 'List/Record: Item' field with a filter on 'Contract'. Hide the standard Item field using a User Event script's `beforeLoad(context)` and update its value via a Client Script's `fieldChanged(scriptContext)` to ensure dependent field sourcing.
Scenario
Users require a Transaction Column Field to dynamically filter its available items based on a selected value in a transaction header field. This dynamic filtering ensures that only relevant items are presented, improving data accuracy and user experience during transaction entry.
Solution
The solution involves a combination of custom field configuration and scripting. A new Transaction Column Field of type 'List/Record: Item' is created, with a filter applied based on a 'Contract' field. To ensure proper sourcing for all fields dependent on the standard item, the standard Item field must be hidden using a User Event script's beforeLoad(context) function. Subsequently, its value needs to be updated when the custom field changes, which is handled by a Client Script's fieldChanged(scriptContext) function.Here is how to create a dynamic filter on a Transaction Column Field:
Navigate to
Customization > Lists, Records, & Fields > Transaction Column Fields > New.Configure the field: Set the Type to 'List/Record', specifically 'List/Record Item', and apply it to the relevant record types.
Under the 'Sourcing & Filtering' subtab, add a line item with the following values:Filter Using: 'Contract' (The Item's field)Compare Type: 'equal'Compare to Field: 'Contract' (The Transaction Body field)
Expert NetSuite Support
Need help with this NetSuite issue?
Custom Fields, Records & Forms consulting and configuration support
