I'm trying to create packages with Server SuiteScript... it's not looking good. Anyone done this or know if it's even possible?
Quickly I tried:
function OnBeforeSubmit(type) { var currentRecord = nlapiGetNewRecord(); if(currentRecord == null) { nlapiLogExecution ('DEBUG', 'Failed to get handle to record'); return; } // try and get a package item count var lineCount = currentRecord.getLineItemCount('packages'); // also tried 'package' if(lineCount != null) { nlapiLogExecution('DEBUG', 'There are ' + lineCount + ' packages'); } else { nlapiLogExecution('DEBUG', 'Error getting package count'); return; } return; }However this returns -1 as the count for the packages (not surprised, I was just taking guesses on how to get to this data)There are many, many things I want to do with a script that can create packages... I really hope it's possible somehow?Thanks for reading,Steve