Question

I have added a dropdown with list feature in my Suitelet, which has customer names in it.

form.addField('fieldX', 'select', 'Select Field','customer');

How do I get value selected by user, in a variable?

Was it helpful?

Solution 2

Do you want to get the value after the user has selected it? Then you will need to create an undeployed field changed client script. After creating the script record, you will need to attach it to your suitelet using form.setScript().

If you want to get the value when the user submits the suitelet, you can do that using request.getParameter('fieldX').

OTHER TIPS

This returns the ID of the selected option:

nlapiGetFieldValue('fieldX')

This returns the text of the selected option:

nlapiGetFieldText('fieldX')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top