Error when running Script per Hand

Viewing 2 reply threads
  • Author
    Posts
  • March 24, 2026 at 11:51 AM #53792

    Steve-Kai Vyska
    Participant

    Hello everyone,

    i have a very simple script to get the ID of a Record:

    function Auto_Script_Gezahlt() {
        
        return record.getId();
    }
    
    Auto_Script_Gezahlt();

    This scripts work in all forms, except this one where I get an Error whenever I start it in the script window. the problem is the variable record, which comes from the program. I have put pictures in here to illustrate what it is doing However the script works in the form correct, but it ist not possible to check something in it, because of the error.

    Have a nice evening

    Steve

    Attachments:
    You must be logged in to view attached files.
    March 24, 2026 at 12:55 PM #53798

    Brendan
    Keymaster

    Do you have a selected record on the form? If there’s no selected record, then the record variable will be undefined.

    March 24, 2026 at 1:32 PM #53799

    Steve-Kai Vyska
    Participant

    Yes there was a selected record, I was also able to read data from the Record correctly to a field. More interesting was, that after I did nothing for around 20 min and restarted the Database again it worked. I had the same thing some time ago with another database. actually I can not reproduced the error. When it comes again I would reopen this thread and write what I have done :)

    But thanks for the quick answer

    Steve

Viewing 2 reply threads

You must be logged in to reply to this topic.