/ Forums / Advansys Formativ / Creating Solutions with Formativ / BUG: Retreiving the Subject of CurrentItem / Reply To: BUG: Retreiving the Subject of CurrentItem

#8021
sam
Participant

    Thanks for the reply.

    This action is a REPLACE GROUPWISE EVENT
    When main runs onSend Action
    1. Create a new message
    2. Save the somposing item to draft (Because we NEED to keep formatting on subject and body text)
    3. Copy the properties (subject, body, attachements) from the draft message to the new message.
    4. send the draft and the new message.

    no emails sent get the signature even thought we choose to add from the initial signature prompt screen.

    Note: I tryed to send the composing item in the above flow to see if the signature would apear and it didn’t.

    This behavior is also produced if the event is changed to “run before”.

     
    
    
    
         dim iWIPFolderPath
             dim oMsg
             dim iMsgID
             dim iWIPPath
             dim iBreakCount
    
             ' Get the message ID
             iMsgID = GroupWise.ItemMessageIDFromView
    
           ' If the draft message then save to WIP otherwise access the message
           if (iMsgID = "X00") then
    
        
         '  function saves to draft 
         set oMsgCopy =  SaveComposingItemToDraft()
          Set objDraft = GroupWise.Account.MailBox.Messages.Add(4)
    
          'set subject and body
          with objDraft
             .Subject.PlainText = oMsgCopy.Subject.Unicode
             .BodyText.RTF = oMsgCopy.BodyText.RTF
          end with
    
           ' add attchements form original email
           if oMsgCopy.Attachments.Count > 0 then
             for sndIntCounter = oMsgCopy.Attachments.Count to 1 Step -1
               if oMsgCopy.Attachments(sndIntCounter).ObjType <> 2 then
               	  ' add to email
                  valFileName = utilities.CreateValidFilename(oMsgCopy.Attachments(sndIntCounter).DisplayName)
                  oMsgCopy.Attachments(sndIntCounter).Save utilities.tempfiles & valFileName
                  objDraft.Attachments.Add utilities.tempfiles & valFileName, , oMsgCopy.Attachments(sndIntCounter).DisplayName
                end if
             next
           end if
    
           ' Add Email for draft
           select case form.cboDestination.text
             case gstrDestinationItems(0)(0)
               objRecipient = objDraft.Recipients.Add(gEmail1,,0)
             case gstrDestinationItems(0)(2)
               objRecipient = objDraft.Recipients.Add(gEmail2,,0)
             case gstrDestinationItems(0)(1)
               objRecipient = objDraft.Recipients.Add(gEmail3,,0)
             case else
               objRecipient = objDraft.Recipients.Add(gEmail4,,0)
           end select
    
           ' send copy
           objDraft.Send
    
     	' send composing
           oMsgCopy.Send
    
           ' clear change flags
           groupwise.EnvClearChangedFlag
    
           ' close composing window
           groupwise.CloseWindow