There is a Suitelet script that creates a custom P...
# suitescript
n
There is a Suitelet script that creates a custom PDF (I haven't developed this one). I am sending the request from an MR script to this Suitelet to generate the PDF and writing the response as response.writeFile. But when I check the repsonse.body in MR, it is just {}. What am I doing wrong? Can I get the file from the Suitelet to MR and create an email attachment?
b
probably better to just use the suitelet file as a library
its more annoying for suitelets you dont control
since you end up having to mock the suitelet'e request and response interface
n
I tweaked the suitelet to save the file and return the File ID. The response body is still {}. Is this a defect?
b
what does your code look like
n
It worked now finally
But I still can't figure out why I am not able to get the file back from the Suitelet.
g
are you sure your response.writeFile is actually called? check it isn’t returning early or erroring inside an async (i.e. untrapped but dropped)
n
It is called.