Has anyone tried to use context.response.writePag...
# suitescript
j
Has anyone tried to use context.response.writePage and context.response.writeFile at the same time? I am currently trying to download a file and show a success message in the UI at the same time
s
I have tried with writeFile. But never tried both at the same time.
Are you passing the form object to writeFile()??
j
no, i'm passing the form obj to writePage and passing a nlobjFile to writeFile
context.response.writePage(form); context.response.writePage(file);
however, the page does not writeback to the UI and instead the page downloads a file containing the html page source of the suitelet
s
context.response.writePage(form); context.response.writePage(file);?? are you using writePage?
context.response.writeFile(file);
Try this !!
j
oh yes, that was just a type.. i meant writeFile() for file
typo*
s
I have never write with both.
I usually use a different suitelet for file and create a button in the form suitelet and call the suitelet on click of the button