Client wants to Download CSV file on Click of Button

I have created one button using Workflow , and a workflow action script is written to fetch and create a csv file to download . Everything is working fine except

Context.response. writeFile();

                 file: csvFile,
                 isInline: true

It is throwing me error: Cannot read writeFile undefined at line xxxx.

Is there anyway to  download file , I dont want to use Suitelet.

Or is it possible to export csv to system using any other methods in workflow action Script.

Note:Do not want to save file in file Cabinet.

Any suggestions will be great help.

Thanks in advance.

Rookie Asked on July 8, 2023 in SuiteScript.
Add Comment
2 Answer(s)


As per the docs…

…a Workflow Action Script’s context does not contain “response” so you can’t use it in this way.

Is there a reason you don’t want to use a Suitelet? Since I’d imagine the code would be almost identical.



Advanced Answered on July 10, 2023.
Add Comment

Thanks Chris, I used backend Suitelet itself.


Rookie Answered on July 11, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor