In this tip, we will see “How to get a CSV file of a particular search result via suitescript?”

Let’s say, we have to search customer record to get these fields (Phone no. and Id).

Then, on a button click, we will get the CSV file of that search result.

Steps:

1. Search Customer record for these felds (Phone no. and Id).
2. Create a CSV file with the content of search results obtained above.
3. Upload the CSV file to a particuler folder of File Cabinet.
4. Get the link of that uploaded CSV file.
5. Add a Iframe to the Suitelet and need to put that link as source,
6. On button click, Suitelet will be called, then, CSV file will be downloaded automatically.
7. In this way we can add any search criteria to get records and ask the user to save the file.