/ Forums / Advansys Formativ / Creating Solutions with Formativ / On Send event – How to manage exceptions ?

  • Creator
    Topic
  • #3928
    pasclinaui
    Participant

      I wrote an applet to confirm a message delivery, by asking user to acknoledge a choice in a Corporate Form;
      If user does not agree whit some terms of use, I’d like to stop the subroutine without executing On Send event !!!

      How can I solve this problem ?

      I didn’t find any way to skip On Send Event.

      A good solution Would help me to demonstrate definitely the power of Formativ Environment !!!

      Any suggestion Will be appreciated !

      GRAZIE !!!

    • Author
      Replies
    • #6629
      Support 1a
      Participant

        The GroupWise.CancelGroupWiseEvent should do what you want. You will need to be using a more recent version of Formativ for this work (1.5.3 or newer I suspect).

        Here’s an example. Integrate this applet on the email On Send event, restart the client if required, then try to send an email message.

        Sub Main(Client, GWEvent)
        
          if MsgBox("Do you accept the terms and conditions?", vbYesNo, "Formativ") = vbNo then
            GroupWise.CancelGroupWiseEvent = true
          end if
        
        End Sub

        I hope this helps.

        Advansys Support

      Viewing 1 replies (of 1 total)
      • You must be logged in to reply to this topic.