Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Community Poll: What sort of content would you like to see more of?

CSV Import Script - Invalid Return

Hi all

I am trying to validate the below script to automate the import of a CSV file. However I get an error saying

Syntax Error: Invalid Return

When I try to upload the javascript file.

Any pointers greatly appreciated.

 * @NApiVersion 2.0
 * @NScriptType ScheduledScript


function execute(scriptContext){
var scriptTask = task.create({taskType: task.TaskType.CSV_IMPORT});
scriptTask.mappingId = 212; 
var f = file.load('SuiteScripts/Purchasing Update 2022.csv');
scriptTask.importFile = f;
var csvImportTaskId = scriptTask.submit();

kind regards


Howdy, Stranger!

Log In

To view full details, sign in.


Don't have an account? Click here to get started!


Community Whiz

Quarter 1 (Jan-Mar 2024)

This Week's Leaders

This Month's Leaders

All Time Leaders