2

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.

Gus
  • 45
  • 5

1 Answers1

4

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().

I believe you can provide the ID of a Saved Search as the source to populate it with search results, but I am not positive of that.

erictgrubaugh
  • 8,519
  • 1
  • 20
  • 28