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!
How to generate CSV Response Link for CSV Import Task in SS 2.X
Hello Gurus,
I'm using N/task module and the method task.create to create CSV Import:
const createCSVTask = (fileId, mapping) => { var scriptTask = task.create({taskType: task.TaskType.CSV_IMPORT}); scriptTask.mappingId = mapping; scriptTask.importFile = fileMod.load({ id: fileId }); return scriptTask.submit(); }
the createCSVTask function is returning the task ID, for example: CSVIMPORT_03686f157c691603041702066c1d0057380c070618126f01154d0e4c5e_706e2435102c2acc8e9078bea710783245716a9c
Using SuiteScript 1.0 I was able to concatenate the task ID to https://XXXX.app.netsuite.com/app/setup/upload/csv/uploadlogcsv.nl?wqid= and the link just worked.
I need to make it work in SuiteScript 2.X, but the task ID is very long string and it is not the internal id of the CSV import task.