Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Search - File Deletion SuiteScript
Hi,
I am trying to use a script for Batch File Deletion that uses an existing File Search, I got most of it working however it fails on function (nlapiDeleteFile) with error Cannot convert NaN to java.lang.Integer (SYSTEM_LIBS$NSAPI$sys#651)
function main() {
var s = nlapiSearchRecord('file', 'customsearch1203');
for (var i = 0; i < s.length; i++) {
var cols = s[i].getAllColumns();
var internalId = s[i].getValue(cols[0]);
nlapiDeleteFile( internalId );
}
}
Any idea how to fix this issue?