getFormNamed with Link to Form

Viewing 2 reply threads
  • Author
    Posts
  • September 17, 2023 at 12:18 PM #49855

    Lane Robinson
    Participant

    Hiya,

    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.
    September 17, 2023 at 1:19 PM #49860

    Lane Robinson
    Participant

    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.

     

     

    September 18, 2023 at 2:32 PM #49870

    Brendan
    Keymaster

    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');

Viewing 2 reply threads

You must be logged in to reply to this topic.