Discussions
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
Spoiler Spoiler Warning ▲▼
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',
Richard James Uri - SuiteCloud | WMS Tech | SuiteCommerce Advanced
----
- NetSuite Admin Corner | 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!