I have a suitelet that creates a form which includes a multi select field (from a custom record) and a regular select field (dropdown customlist)..
When the user selects the list (from the sublist dropdown) or the multiselect button the suitelet appears to RELOAD and all my declared variables disappear.
The following is a snippet of the code for setting up the fields on the form:
var form = nlapiCreateForm(SUITELET_TITLE, true);
var fldCustomer = form.addField('custpagecustomer', 'select', 'Customer', 'customer');
fldCustomer.setDisplayType('disabled');
fldCustomer.setDefaultValue(stCustomerName);
var fldPONumb = form.addField('custpage_ponumb', 'text', 'PO Number');
fldPONumb.setDisplayType('disabled');
fldPONumb.setDefaultValue(stPONumb);
var fldProc = form.addField('custpage_proc', 'select', 'Procedure', 'customlist_equipment_proc_list')// custom list with 300 items
fldProc.setDisplayType('normal');
fldProc.setDefaultValue(stprocedure);
fldProc.setMandatory(true);
var fldMaster = form.addField('custpage_master', 'multiselect', 'Master Used', 'customrecord_jak_master' );// custom record with 500+ items
fldMaster.setDisplayType('normal');
fldMaster.setDefaultValue(stmaster);
fldMaster.setMandatory(true);
var flddoneBy = form.addField('custpagedone_by', 'select', 'Done By', 'employee');
flddoneBy.setDisplayType('normal');
flddoneBy.setDefaultValue(stdoneBy);
var fldcalComm = form.addField('custpagecomments', 'select', 'Comments', 'customrecord_cert_notes');
fldcalComm.setDisplayType('normal');
fldcalComm.setMandatory(true);
var fldLastCal = form.addField('custpage_lastcal', 'date', 'Last Cal Date');
fldLastCal.setDisplayType('normal')
fldLastCal.setDefaultValue(dtLastCal);
fldLastCal.setMandatory(true);
form.addSubmitButton('Submit');
return form;
The fldProc (custom list) and fldMaster (custom record) are the two fields in question. When either one is selected (via the dropdown arrow) "Loading" is displayed and the suitelet locks up. When we look at the Execution log all of the variables are reset to null or undefined.
Anyone have any ideas.
Thanks,
Pete