Can't seem to figure this one out. I am getting a depositapplication record to submit but nlapiSubmitRecord returns 0 (Zero). So I can't immediately work with the inserted customerdeposit. I think I need to now hunt for it but this seems contrary to the API and all the other times I have called nlapiSubmitRecord.
var depappl = nlapiTransformRecord('invoice', id , 'customerpayment'); depappl.setFieldValue('trandate',date); depappl.setFieldValue('postingperiod', period); var lineNum = depappl.findLineItemValue('depo' + 'sit', 'doc', depositid); depappl.selectLineItem('depo' + 'sit', lineNum); depappl.setCurrentLineItemValue('depo' + 'sit', 'apply', 'T'); depappl.setCurrentLineItemValue('depo' + 'sit', 'amount', amt); depappl.commitLineItem('depo' + 'sit'); var newID = nlapiSubmitRecord(depappl, false, true)); // newID returns zero when we have a good insert