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.
Is there any way to get the internal ID of the CSV import task in SS 2.X?
Can I use SuiteQL to look through the CSV import statuses/tasks?
Thanks!