Discussions

Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Community Poll: What sort of content would you like to see more of?
Get ready to take on exciting new challenges and become the next SuiteMaster of the Month!

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

----

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!

Leaderboard

Community Whiz

Quarter 3 (Jul-Sep 2024)

This Week's Leaders

This Month's Leaders

All Time Leaders