This message was deleted.
# suitescript
s
This message was deleted.
s
momentjs?
Convert to a long and do your math and convert it back looks like
Typically you would use something like momentjs (or simple JS math if you want) to calculate this outside of the PDF on the record you're printing if its applicable. Then the PDF is only displaying information and not doing any business logic.
👍 1
s
If there is any way at all to do this calculation outside of Freemarker, I’d highly recommend that just for simplicity. Are these date values from a record?
j
Thank you. Can't go from the record, since it's a changing variable every time we print the PDF.
I have no other option than to do it in the pdf
s
where does the value come from then? It has to be sourced from somewhere
j
it is. I promise you, this is what I have to work with in this case
s
Okay, but where from then? NetSuite’s Freemarker templates can’t source in any data that is not passed to them other than by a script, saved search, or a record. There are some built-ins, but other than that all of the data comes from one of those sources.