Gus
Gus

Reputation: 45

NetSuite Suitelet add select field based on saved search or custom field

I know that I can use form.addField to add a select field with a list of records by adding it as a source in the addField method. I'm trying to show a list of customers that is filtered and only shows the name an not the id.

What are my other options for source in addField? Can I just enter the id of a saved search instead of a record?

What are my options for exposing the list of records to the user in a more controlled way, ie filtering, choosing the field the user sees in the drop down.

Upvotes: 2

Views: 3110

Answers (1)

erictgrubaugh
erictgrubaugh

Reputation: 8847

Unfortunately field filtering is not exposed via the SuiteScript Field API. If you want a filtered list of records, you'll have to do the search for those records yourself, then populate the select field yourself using Field.addSelectOption().

Upvotes: 4

Related Questions