I tried to update the employees record in an Netsuite system using the Scheduled CSV Import. while deploying the Scheduled Script, I put the status has "Testing" and click "Save & Execute" Button for testing purpose.
And then I checked the Execution Log in the Log it shows the following error message:
" com.netledger.app.common.scripting.version1.nlobjCSVImportImplV1"
Scheduled Script Code:
function scheduled(type) {
var fileId = nlapiGetContext().getSetting('SCRIPT', 'custscript_sfg_customer_rec_cus_param');
nlapiLogExecution('DEBUG','fileId:',fileId);
var import1 = nlapiCreateCSVImport();
nlapiLogExecution('DEBUG','import1:',import1);
var mapping = import1.setMapping('CUSTIMPORT_emp_rec_imp');
// Internal id for mapping
nlapiLogExecution('DEBUG','mapping:',mapping);
var setPrimary = import1.setPrimaryFile(nlapiLoadFile(fileId));
// id is Internal id for Employee file
nlapiLogExecution('DEBUG','setPrimary:',setPrimary);
var submitImport = nlapiSubmitCSVImport(import1);
// Importing is Done
nlapiLogExecution('DEBUG','submitImport:',submitImport);
}
Help me to find the solution for creating the scheduled CSV Import.
Thanks in Advance.
There are a couple of possible issues with your code: