Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
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!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
getText inside Suitelet
How do you get the text in a drop down field?
Have tried a lot of different things, such as getParameter, getParameterValues, but I keep on returning either the "key" value, or an error. (Error is that the function doesn't exist)
Looking for the equivilent to getText function inside Suitelet. Any thoughts on that?
p.s. how do you insert code in these forums?
function SimpleForm(request, response) { if ( request.getMethod() == 'GET' ) { var form = nlapiCreateForm('Modem Builder'); var field = form.addField('textfield','text', 'Text'); field.setLayoutType('normal', 'startcol') var manufacturers = form.addField('custpage_manufacturers','select', 'Manufacturer'); manufacturers.addSelectOption('',''); manufacturers.addSelectOption('CP', 'Cradlepoint'); manufacturers.addSelectOption('SW', 'Sierra Wireless'); manufacturers.addSelectOption('DI', "Digi Int'l"); manufacturers.addSelectOption('EN', 'Encore Networks'); manufacturers.addSelectOption('CA', 'CalAmp'); manufacturers.addSelectOption('MT', 'Multitech'); var product_type = form.addField('custpage_product','select', 'Product Type'); product_type.addSelectOption('',''); product_type.addSelectOption('MR', 'M2M Router'); product_type.addSelectOption('MM', 'M2M Modem'); product_type.addSelectOption('MG', 'M2M Gateway'); form.addSubmitButton('Submit'); response.writePage( form ); } else { var form = nlapiCreateForm("Suitelet - POST call" ); var resultField1 = form.addField('custpage_manufacturers_output', 'text', 'Text Field value entered: ' ); resultField1.setDefaultValue(request.getParameter( 'custpage_manufacturers' )); ###########where this only returns the key. But I need the 0