2 Replies Latest reply on Dec 4, 2012 1:51 PM by jwshelton22

    Script runs when New Record Created

    jwshelton22

      Title

      Script runs when New Record Created

      Post

           Okay I inherited a database, originally developed in FM10. I cannot find a script trigger anywhere including in layout menu and start up scirpt.

           Whenever a new record is created this script runs. File is being converted to 12. Without this script running some ID's are not being set and a non stop error message keeps popping up.

           The script runs no matter which menu item you use to create new record. I can place it as a layout script I guess. Just really curious how this script runs. With script debugger on, the script pops up as soon as new record selected.

            

           thanks,

           jim

        • 1. Re: Script runs when New Record Created
          philmodjunk

               It could be that a custom menu has been installed where selecting New Record performs this script instead of the standard New Record action. If so, you should see a New Record/Request step in the script.

               It might be possible to use the OnRecordLoad script trigger to do this if the script contains an If step that is used to detect whether or not the record that just became the current record is a new record. A field, for example, might be empty when the record is first created, but this script could set a value in the field. Then an If step at the beginning of the script could check this field before either doing the "new record" tasks if new or exiting if it is not.

          • 2. Re: Script runs when New Record Created
            jwshelton22

                 Custom Menu was the correct answer.

                  

                 thanks

                 Jim