1 Reply Latest reply on Aug 21, 2009 6:45 AM by LaRetta_1

    Get ( LastMessageChoice )

    mark_d2x

      Title

      Get ( LastMessageChoice )

      Post

      Hi I am having problems with a script:

       

      I have created a script that duplicates a record and deletes out some of the information - that works fine.

       

      For the button that runs this script I have done the following script:

       

      Show Custon Dialog ["Duplicate Record Request"; "You have requested to duplicate this record" "Click OK to continue or Cancel to stop"]  (OK is the default button and Cancel is button 2)

      If [Get ( LastMessageChoice ) = 2]

      End If

      Perform Script ["Duplicate record request"]

       

      What is happening is that you click OK - the ["Duplicate record request"] script runs and when you click Cancel it also runs.

       

      Where am I going wrong?

       

      Mark

       

        • 1. Re: Get ( LastMessageChoice )
          LaRetta_1
            

          Hi Mark, you don't have a script action scheduled if the process is cancelled, including stopping the script (exit script).

           

           

          If [Get ( LastMessageChoice ) = 2]

          ... do whatever you wish if the process is cancelled such as change layouts etc.

          Exit Script

          End If