Hi, I created a suitelet that show the report I ne...
# suitescript
t
Hi, I created a suitelet that show the report I need created a button on the suitelet to export the report. How should I implement it? Actually when user click export I need to create a file and open it. Just like it happens in netsuite export feature.
b
make a suitelet that uses ServerResponse.writeFile
you may be able to reuses your existing suitelet's submit button, or you may make your button use client script and use something like window.open
t
Thanks battk, I am using suite script 1.0
Not using submit button I created a button export and On click I am calling client script function
But not able to Create any file even not getting any error...
Does nlapiCreateafile works in client side?
b
no
you must do this server side
depending on your browser support, you might be able to create a string that you use your browser to open
but honestly the ss2 way will probably be easier
t
Actually I am creating a report in suitelet and I want to export it using button click ... so do I need to creating the report again on button click and bind it to excel or can I read existing Suitlet report using nlapigetlineitemvalue
b
not sure what you mean by report, reports can actually mean a specific report api in ss1
its rare enough that i think you mean something else
t
I am generating a report from suitelet on date basis with the help of saved search
message has been deleted
b
i personally cant tell
t
Thanks for you help
b
you still are describing this using the word report
that could possibly mean nlobjReportDefinition
or it could mean you are misusing it for a List or Sublist