Create a CSV file from a saved search using SuiteScript (N/task module) : NetSuite SuiteScript
Create and Submit an Search Task and Export the Results into a CSV File
Search task to execute a saved search and export the results of the search into a CSV file stored in the File Cabinet. After the search task is submitted, the sample retrieves the task status using the task ID. Some of the values in this sample are placeholders.