Discussions
Getting Line Items From A Suitlet Sublist
I have created a Suitlet Form and Sublist. Upon some data entry into the sublist I want to save each Sublist line item as an independent record. I am having problems accessing the sublist as I keep getting "Null" instead of a value. See part of the script below - can anyone tell me what I am doing wrong? Thanks, Pete
var searchResult = arrSearchResults;
calResults.setLineItemValues(searchResult);
var count = calResults.getLineItemCount();
form.addSubmitButton('Submit');
response.writePage(form);
}
else
{
for (i = 1; i <= count; i++)
{
var calRec = nlapiCreateRecord('customrecord_cal_results');
calRec.setFieldValue('custrecord_cal_equipment', stequipID);
calRec.setFieldValue('custrecord_cal_gage_sn', calGageSN);