Create and save or load a previously created Saved Search in NetSuite. On the Edit Saved Search page, click the "Export to SuiteScript 2.x" link, added to the top of the page, to display a modal window with the Saved Search exported to SuiteScript 2.x, formatted as TypeScript. Click the "Copy to Clipboard" button to copy the code in its entirety to the Clipboard for further use.
Note that some Saved Searches may not be exportable. If a Saved Search cannot be exported, the "Export to SuiteScript 2.x" link will not be visible.