Hello, Im creating a pdf that Im attaching to an ...
# suitescript
i
Hello, Im creating a pdf that Im attaching to an email, Im creating the xml as is on the advanced pdf, and then sending that string to this function, it creates the pdf but the content of it is literally the whole string of xml, so on the pdf I’m seeing
<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//big.facel...
Is
render.xmlToPDF()
the right options to do this or should I use other like
file.create()
?
b
not sure what your emailBody is, but its unusual to escape your template
i
This is the string that Im sending to the function
b
this looks like an attempt to ignore netsuite's native template related functionality
that said, you want to escape the values like
Copy code
itemsData.items[i].totaldxw
not the entire template
Copy code
+ xml.escape({xmlText : itemsData.items[i].totaldxw}) +
i
So, can I for example create the pdf using the advanced pdf template that I already have and attach that to the email?
b
yes, there is a bunch of functionality in N/render for using existing templates in netsuite
i
Awesome, let me take a deeper look at it. And sorry for my questions, Im just getting the hang of this thing called netsuite haha