Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
Register Now
Retrieve CSV Import errors using Restlet
I want to retrieve the errors for a CSV Import job. Co-pilot suggested I could use this code but it fails on 'search.create' - I am guessing cause there is an issue with 'csvimporterror' which I do not see as a valid type. Can this code be fixed or is there some other code that will do the job?
function getErrors(requestParams) {
var jobId = requestParams.jobId;
var errorSearch = search.create({
type: 'csvimporterror',
filters: [
['csvimportjob', 'is', jobId]
],
columns: ['line', 'errormessage']
});
var errors = [];
errorSearch.run().each(function(result) {
errors.push({
line: result.getValue('line'),
errorMessage: result.getValue('errormessage')
});
return true;
});
return errors;