Last year I had this working. Now it’s not! It’s a Link to Form field.
form = document.getFormNamed(‘invoices by copying’);
// fails here ##### create invoice: TypeError: undefined is not an object (evaluating ‘form.name’), line:(null)
console.log(“to form ” + form.name);
Attachments:
You must be
logged in to view attached files.
Well, just ignore this. The database was damaged in some way I wasn’t going to waste more time on, as I rolled back to a previous version and it worked as expected. I had to removed the test data from that backup is all, not much work. Was probably something I did last year.
Thank you for your time.
Glad you figured out the issue.
Also form
is a keyword, so I would avoid using that if you’re assigning a form to a variable. I would choose something like var invoicesForm = document.getFormNamed('invoices by copying');