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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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