Does anyone know of a way to return a PDF from a SS2.0 restlet without having to write to the file cabinet?
b
battk
10/01/2020, 10:58 AM
not really
battk
10/01/2020, 10:59 AM
your closest option is to return the base 64 contents of the file
d
Dominic B
10/01/2020, 11:25 AM
Thanks, guessed that'd probably be the case. Got it writing to the file cabinet now - just trying to work out how to redirect without Netsuite responding with a 404
b
Bibek Shrestha
10/01/2020, 1:35 PM
From a suitelet, I can return a pdf as a response and access that from the client script. It gets rendered in the browser tab and the user can download/print from it.
Could you do the same with the restlet?
d
Dominic B
10/01/2020, 2:35 PM
I was actually refactoring to a restlet as we'd used a suitelet and were hitting governance in some cases. Seems you can't return the PDF directly. It's now all working - I'm writing to a static file location and redirecting the browser from the client script.