5 Replies Latest reply on May 6, 2014 6:00 AM by philmodjunk

    Error Message

    neil45156

      Title

      Error Message

      Post

           Hi All,

           I have converted 3 FM10 files into one FM12 database. On the old database files each layout had a New Record Button added. In the new FM12 database I have deleted the New Record Button because I wanted the users to use the New Record Button on the status bar.

           The problem I have now is that everytime I click the New Record Button on the status bar, I get the following error message, "This script cannot be found or has been deleted"

           I have even created the button again on the layout but I still get the error message.

           Can anyone tell me how I can stop this happening?

           Thanks

        • 1. Re: Error Message
          philmodjunk

               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.

          • 2. Re: Error Message
            neil45156

                 Hi Phil,

                 I have tried both those options and none of them have been applied.

                 Thanks for responding

            • 3. Re: Error Message
              philmodjunk

                   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.

              • 4. Re: Error Message
                neil45156

                     Hi Phil

                     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?

                     Thanks

                     Neil

                • 5. Re: Error Message
                  philmodjunk

                       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:

                         
                  1.           You can upload a screen shot of your script by using the Upload an Image controls located just below Post a New Answer.
                  2.      
                  3.           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.)
                  4.      
                  5.           If You have FileMaker Advanced, you can generate a database design report and copy the script as text from there.
                  6.      
                  7.           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...

                         
                  1.           The recovered copy may behave differently even if recover reports "no problems found".
                  2.      
                  3.           Recover does not detect all problems
                  4.      
                  5.           Recover doesn't always fix all problems correctly
                  6.      
                  7.           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).