//Info: JOIN-203
Bugs & errors are common in every script. Usually, we used to Identify these by using try and catch statements.
what if there are chances to get ‘n’ number of errors in each part…?
its better if we are able identify errors in initial run, save it & continue the next section.
Even though there are high number of counting takes place for every run, we can store them separately under a folder in NetSuite File cabinet section.
csvFileData += idvalue + ',' + err + ',' ;
var errorCsvFile = file.create({
name: 'jj finance imort trandate Errors Found.csv',
contents: csvFileData,
folder: 5072, //id of folder created
fileType: file.Type.CSV
});
var fileId = errorCsvFile.save();
Note:
* For this, we have to create a folder in File Cabinet & copy the folder id.(Here it is 5072)
* “err” is the Error we got in catch section.