/ Forums / Advansys Formativ / Creating Solutions with Formativ / How to test if I am editing an email or viewing a sent item…

  • Creator
    Topic
  • #4188
    MrTibs
    Participant

      I am trying to create and autosave feature but I am having some trouble. When you care creating an email, the ID is “X00” but after you save the email, it gets a new ID (a different one everytime). How can I tell if I am working on an email to be sent or simply looking at a recieved email or sent email?

    • Author
      Replies
    • #7413
      Support 1a
      Participant

        You could probably determine this by looking at the BoxType property of the message. If it was ggwDraft (4) you would know it was a draft message.

        See http://developer.novell.com/ndk/doc/gwobjapi/gwobjenu/data/hvdi8k74.html#hvdi8k74 for more information.

        Which version of the GroupWise client are you using?

        Regards,

        Advansys Support

        #7414
        MrTibs
        Participant

          Thanks for the reply. I found this link but I don’t know how to use it in code.

          I’m using ver. 6.5.3 of the client.

          #7411
          MA
          Participant

            Here is some sample code to check the message type of an active view.

            dim oMsg
            dim iMessageID

            ‘ Get the message ID of an active view
            if (groupwise.throwtoken(“ItemMessageIDFromView()”, iMessageID)) then

            if (iMessageID = “X00”) then
            msgbox “This is draft message”
            else
            ‘ Check the box type of the message
            set oMsg = Client.clientstate.commandmessage
            msgbox oMsg.boxtype
            set oMsg = nothing
            end if

            end if

            Thanks
            MA

            #7412
            Support 1
            Participant

              Thanks for the suggestion MA.

              Regards,
              Advansys Support

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