I have a template that spawns x number of times based on a value of a field on the form. The spawn is set to happen when the files is saved. My issue is that when the form is first completed and created it is being done in Netsuite and as fasr as I know there is no way to trigger that script while this process is happening.
What the user is currently doing is letting Netsuite fill the pdf and then they download the form, change any field in the form and then revert that field to what it was before so that the save option is avaialble and then saves the form so the spawn is triggered.
My goal is to bypass having the user manipulate a field so that the save option is available and the spawn is triggered. Any ideas on how I can achieve this?
Add the following code as a doc-level script to your file:
this.dirty = true;
Thanks. After typing my initial message I decided to have the script run on open but only if the page count is more than 1. So far this worked.
It doesn't bother you it will spawn new pages each time you open the file?
I have variable before the spawn that gets the total pages and then have an if statement that only runs the spawn if the page count is 1. It's a 1 page form.