Support 3

    Your code review shows that you did not call the GetWIPFolderPath from the main subroutine prior to save the message. The following code works fine in our environment. Let us know if we missed anything…

    Sub Main(Client, GWEvent)
      dim iWIPFolderPath
      dim oMsg
      dim iMsgID
      dim iWIPPath
      Dim iBreakCount
     ' Save the draft message to the Work in Progress folder
      Call Groupwise.ItemSetText("X00", itfSubject, " COMPLETED", TRUE) ' TRUE = Append
      call GetWIPFolderPath(groupwise.account.workfolder, iWIPPath)
      msgbox "Work In Progress folder path: " & iWIPPath
      Call Groupwise.throwtoken("ItemSaveMessageDraft(""" & iWIPPath & """)", iReturnVal)
      ' Calling ItemMessageIDFromView immediately after GroupWise.ItemSaveMessageDraft
      ' can result in an X00 ID.
      iMsgID = GroupWise.ItemMessageIDFromView
      iBreakCount = 0
      while (iMsgID = "Token failed execution!") or (iMsgID = "X00")
         iMsgID = GroupWise.ItemMessageIDFromView
         iBreakCount = iBreakCount + 1
         Utilities.Trace iBreakCount & ": " & iMsgID
         if (iBreakCount > 10) then
           exit sub
         end if
      set oMsg = GroupWise.Account.GetMessage(iMsgID)
      msgbox "Subject: " & oMsg.subject.plaintext
    End Sub
    ' Get full path of the Work-In-Progress folder where Drafts are saved
    Function GetWIPFolderPath(aGWFolder, byref aPath)
      Dim sHome
      sHome = ""
      Utilities.Trace "aGWFolder.Name=" & aGWFolder.Name & " aPath=" & aPath
      If (Cint(Left(GroupWise.EnvVersionName,1)) >= 7) Then
        If aGWFolder.Name = GroupWise.Account.Owner.DisplayName Then
          sHome = " Home"
        End If
      End If
      If aGWFolder Is Nothing Then
        Exit Function
      End If
      If (aPath <> "") Then
        aPath = aGWFolder.name & sHome & "" & aPath
        aPath = aGWFolder.name
      End If
      If (aGWFolder.objtype = fgwRoot) Then
        Exit Function
        Call GetWIPFolderPath(aGWFolder.ParentFolder, aPath)
      End if
    End Function  

    BTW, you can use the custom fields to store data or insert the data to the message body. If the data is sensitive then you can consider to encrypt and decrypt at the other end by your solution.

    Most probably in GroupWise 8 (Bonsai) will have the X-Fields where you can add additional data and viewable by other non GroupWise clients.

    Hope this helps.

    Advansys Support