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.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
nlapiSubmit Record Returns Zero (0) From nlapiTranformRecord on depositapplication
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 0