Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
Netsuite suitescript for converting saved search to csv

I am trying to export simple script to csv with code below in suitescript 2.0 ,

require(['N/task'],
function(task) {
    
 var SEARCH_ID = 1487;



       var searchTask = task.create({

           taskType: task.TaskType.SEARCH

     });

       searchTask.savedSearchId = SEARCH_ID;

       var path = 'Test/export.csv';
 
       searchTask.filepath = path;
       
       var searchTaskId = searchTask.submit();
 
       var a = 0;});

However, it gives the following error,

SSS_MISSING_REQD_ARGUMENT 10/5/2021 10:15:40.917 {"type":"error.SuiteScriptError","name":"SSS_MISSING_REQD_ARGUMENT","message":"task.submit: Missing a required argument: fileId / filePath","stack":["createError(N/error.js)","(adhoc−1debugger.user:25)","(adhoc−1debugger.user:3)"],"cause":{"name":"SSS_MISSING_REQD_ARGUMENT","message":"task.submit: Missing a required argument: fileId / filePath"},"id":"","notifyOff":false,"userFacing":true}

Please guide me how to troubleshoot it. I have never worked with script before so any suggestions are welcome.

Thanks!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The filePath needs to be a full path from the top of your File Cabinet hierarchy. All the folders referenced must exist.

Additionally the recommended way to create the search task is as a single step:

var searchTask = task.create({
    taskType: task.TaskType.SEARCH,
    savedSearchId: searchId,
    filePath: filePath
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!