I just tried submitting a CSV Import task (SS2.1) ...
# suitescript
n
I just tried submitting a CSV Import task (SS2.1) in a SuiteLet that is form based, and the error I see is : "*nlapiSubmitCSVImport* is only supported in Scheduled, RESTlet and Bundle Installation Scripts." 🤔 Help says it's only available on server side scripts, ok... not sure the problem? Strikes me as odd since I have submitted Map/Reduce tasks just fine from a SuiteLet before... Tell me I don't have to call a Suitelet and have it submit the task... 🤨
b
its a pretty old error message that has not been updated with newer script types like map/reduce or sdf installation scripts
n
Ok so am i doing something wrong here???
Copy code
let  importTask = task.create({
    taskType: task.TaskType.CSV_IMPORT,
    mappingId: CSV_IMPORT_ID,
    importFile: IMPORT_FILE // loaded file contents
});
let taskId = importTask.submit();
b
read the linked documentation
n
I did and all I see is a paragraph about how validation works?
You mean the bit tha implicitly states: You can use this method only in bundle installation scripts, scheduled scripts, and RESTlets.
Well that sucks if that's the case
Guess I'll be throwing this at scheduled script which is ridiculous.
🤬