If you have FileMaker Advanced, check to see if the layout is set up with a custom menu. If a custom menu is used where new record performs a script instead of the built in menu command, you might get this result if the script for that menu option has been deleted.
Also check Layout setup for an OnRecordLoad trigger that might be trying to perform a script that has been deleted as New record will also trip this script trigger.
I have tried both those options and none of them have been applied.
Thanks for responding
It's probably a script trigger, but a different one than OnRecordLoad.
Do you have FileMaker Advanced? If so, enable the script debugger and then create a new record. You should see the trigger with the missing script pop up in the debugger. It could even be that you have one script performing a second script and the second script is what is now missing and producing this error.
Thanks for the suggestion. The bizarre thing is that when I have enabled Script Debugger, it allows me to click the New Record Button without the error message coming up, but does not show any error messages in script debugger. When I turn off the enable the error message comes back?
That is very strange. Especially since deleting a button from a layout does not delete the script associated with it.
Are you clicking the New Record button you added to the layout or the button for this in the status area tool bar? Does it make a difference?
Does any script appear in the debugger when you try to create a new record?
If so, I'd like to see that script.
If not, I'm wondering if your file or layout may be damaged. You may want to run a recover on the file to check for such a possible reason for this issue.
To post a script to the forum:
- You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
- You can print a script to a PDF, open the PDF and then select and copy the script as text from the opened PDF to your clipboard for pasting here. (with this approach, you can get multiple script steps on the same line, please edit the pasted text by inserting some returns to separate those steps.)
- If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
- If you paste a text form of the script, you can use the Script Pretty box in the Known Bugs List database to paste a version that is single spaced and indented for a more professional and easier to read format.
Things to keep in mind about Recover:
While Recover almost always detects and fully corrects any problems with your file...
- The recovered copy may behave differently even if recover reports "no problems found".
- Recover does not detect all problems
- Recover doesn't always fix all problems correctly
- Best Practice is to never put a recovered copy back into regular use or development. Instead, replace the damaged file with an undamaged back up copy if this is at all possible. You may have to save a clone of the back up copy and import all data from your recovered copy to get a working copy with the most up to date information possible.
And here's a knowledgebase article that you may find useful: What to do when your file is corrupt (KB5421).