Would appreciate a quick sanity check from anyone that may have some experience with this: the situation is needing to use a script with the native print function on an invoice. I’ve created countless scripts and I’ve worked with advanced templates quite a bit, and I’ve created some custom standalone templates with custom data sources etc. However, I don’t believe it’s possible to use any scripting (aside from what BFO/FreeMarker provide within a template) with the native print function — meaning the resulting pdf that is rendered using the advanced pdf template selected on the invoice’s custom transaction form config.
You can attach custom code to the form for instance, or deploy client scripts to a record type of course, and this is helpful for form or client side logic. But there’s nothing similar with an advanced template right? The overall objective is to be able to essentially include a statement within the invoice pdf, showing open transactions and the aging table on the page(s) after the first pdf page(s) that show all the usual info for an invoice.
There are some tricks with custom fields driven by formula or saved search that can then be included in a template… but including search results for open transactions and the level of control needed to do that, does not seem possible using the native print on the invoice which simply renders the template selected on the transaction form. This is definitely possible for a standalone template or for any template that you render within your own suitescript, but I’m trying to have this work for the native print. If anyone can confirm this or knows if I’m wrong here, would appreciate any input. Thanks!