I have a script placed in a Print button that validates certain fields to make sure they are filled in before the pdf is submitted. So it basically says if these fields are empty then generate an error message else print PDF. Well, I'm needing to change the button from a Print button to a Save button. Is there any script that will allow me to do this?
I read that in order for the saveAs script to work you have to create a custom function to get around security rights. But is there a more simple way to do this if I don't need it saved to a specific path? I just need it to operate just like File>Save As does, they can choose where to save it to. Just simply adding the default SaveAs action in the button isn't working, it's bypassing the code that is supposed to stop the form from being saved if certain fields are empty. Is there a simple code that will let them choose where to save the pdf without having security issues? Thanks for your help!
There's no workaround. This method must run from a trusted context.
Another option is to exec the SaveAs menu item, but that too requires the
same trusted context.
If that's all you want, you can set up the button to execute the "File > Save As" menu item, without any scripting.