Discussions
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Pulling data from a Suitelet
I have created a custom email form.
It will be used for employment applications.
There are many, many fields on this form.
What is the best way to get all the field data into the email message?
Right now I am concatenating a variable to hold all the field data.
function simpleEmailForm(request, response)
{
if ( request.getMethod() =='GET' )
{
var form = nlapiCreateForm('EmailForm');
var FirstName = form.addField('firstname','text','Name: First')
var LastName = form.addField('lastname','text','Last');
.
.
.
var Skills1 = form.addField('skills1','text','Skills 1',null,'tabadditonalprofessionalskills');
form.addSubmitButton('Send Email');
response.writePage( form );
}
else
{
var message = "";
message += "Name: " + (request.getParameter('firstname') + " " + request.getParameter('middlename') + " " + request.getParameter('lastname') + "\n\n");