I want to merge PDF via Suitescript. I have tried ...
# suitescript
n
I want to merge PDF via Suitescript. I have tried using the render.mergeEmail method but it didn't work. Threw the error the template is not a FreeMarker template Referring to this SuiteAnswer: https://suiteanswers.custhelp.com/app/answers/detail/a_id/8915
b
n
Thanks @battk I will see if it gives me desired results. Currently, if I merge the PDF from the UI, it source the customer and transaction fields on the PDF.
b
oh, if you just wanted to render a pdf, you are looking to use any of the relevant methods of N/render
with the restriction noted in your error message, your templates must used the freemarker engine used by advanced templates
n
I want to render the PDF but with the entity and transaction details. This PDF template is listed Documents > Templates > PDF Templates
b
you will need to know enough freemarker to tell the difference between the new scritable templates and the old crmsdk tags
and ideally convert to the new scriptable templates
if for some reason you cant, then you must use suitescript 1.0, specifically nlapiMergeRecord
you will have great difficulty using nlapiMergeRecord since it was deprecated long before suitescript 1 was deprecated
n
I was hoping I don't have to change the template to advanced PDF. Thanks for confirming it. I guess that's the only path. Except using nlapiMergeRecord. On the side note, we can still merge the PDF using the UI.
@battk nlapiMergeRecord worked and gave me the results I was getting from the UI as well. Thanks.