Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
NSC | Dynamically Source the Entity List into a Suitelet Select Field
Scenario
User wants a Suitelet to have a Select field sourcing the list of Sales Orders. In this scenario, the list is being retrieved from the search.create method
Solution
To pull up the Sales Orders list from Sales Order Record using N/search module, user can use the getSelectOptions method.
For SuiteScript 2.0
function onRequest(context) {
if (context.request.method == 'GET'){
var form = widget.createForm({
title: 'Sourcing Item'
})
var SOPF = form.addField({
id: 'custpage_sopf',
type: widget.FieldType.SELECT,
label: 'List of Items'
})
var srch=search.create({
type:search.Type.ITEM,
filters: [{
name: 'isinactive',
operator: search.Operator.IS,
Richard James Uri | SuiteCloud and WMS Tech
----
- New to NetSuite
- Explore the NSC Webinars Category
- Join our poll and share your ideas! We want to know what you think. Don't forget to comment and make your voice heard!
- Expand your NetSuite knowledge by joining this month'sAsk A Guru Live about Basic Accounting. RSVP on thiseventnow!