/ Forums / Advansys Formativ / Formativ Creator / API not matching documentation

  • Author
    Replies
  • #5577
    Support 3
    Participant

    ComposingItem is a Formativ wrapper around draft message. Draft message is the composing message which is not sent/saved. Its lets the developer to easily access the draft message properties. In GroupWise, you can access the message properties using the Token API, Object API and SOAP API (GroupWise 7 onwards). Some message properties, you can only access through a specific API (For example, Token API to access the draft message recipients, etc)

    Please see the sample code below of the Token and Object API to access the recipients. As stated below, you can use the Token API to access the recipients for the draft and standard message (i.e. received, sent, etc). Object API to access the recipients of the standard message.

    Token API: http://developer.novell.com/documentation/gwtoken/index.html?gwtokens/data/hj8ej8g5.html.
    Get the recipients from the draft and standard message (i.e. received, sent, etc)

      iMsgID = groupwise.ItemMessageIDFromView
    
      ' TO
      msgbox groupwise.ItemGetText(iMsgID, 0)
      ' CC
      msgbox groupwise.ItemGetText(iMsgID, 2)
      ' BC
      msgbox groupwise.ItemGetText(iMsgID, 3)
    

    Object API: http://developer.novell.com/documentation/gwobjapi/index.html?gwobjenu/data/h7ikbsqg.html
    Get the recipients from the draft and standard message.

      Set oMsg = Client.ClientState.CommandMessage
    
      for x = 1 to oMsg.Recipients.Count
        set oRecipient = oMsg.Recipients.Item(x)
        msgbox oRecipient.EmailAddress & vbcrlf & oRecipient.TargetType
        set oRecipient = nothing
      next
    
      set oMsg = nothing
    

    Hope this helps.

    Regards,
    Advansys Support

    #5574
    brussill
    Participant

    I’ve tried using the following 6 methods to get <TO>, <BC>, <CC> and none work including your suggested code. Please help.

    Groupwise – 6.5.6 (2/1/2006)
    Formativ – Build 2.0.0.12

    METHOND 1)

    dim msgid
    msgid = groupwise.ItemMessageIDFromView
    msgbox groupwise.itemgettext(msgid,itfBC)

    METHOD 2)
    dim RecCounter, RecipientEntry, CCRecHolder, BCRecHolder
    dim RecHolder

    If msg.Recipients.count > 0 then
    for RecCounter = 1 to Msg.Recipients.count
    set RecipientEntry = Msg.Recipients.Item(RecCounter)
    ‘ Recipient type of an address
    Select Case RecipientEntry.TargetType
    Case 0 RecHolder = RecHolder & RecipientEntry.EmailAddress & “, “
    Case 1 CCRecHolder = CCRecHolder & RecipientEntry.EmailAddress & “, “
    Case 2 BCRecHolder = BCRecHolder & RecipientEntry.EmailAddress & “, “
    End Select
    set RecipientEntry = nothing
    next
    End if
    msgbox “RecHolder=” & RecHolder
    msgbox “ccRecHolder=” & CCRecHolder
    msgbox “bcRecHolder=” & BCecHolder

    METHOD 3)
    set msg = GroupWise.ComposingItem
    msgbox msg.to_ ‘DOES NOT WORK
    msgbox msg.subject’WORKS

    METHOD 4)
    call groupwise.focusset(fcsCC, “”)
    msgbox “char=” & groupwise.envtextcurrentword

    METHOD 5)
    iMsgID = groupwise.ItemMessageIDFromView

    ‘ TO
    msgbox groupwise.ItemGetText(iMsgID, 0)

    METHOD 6) does NOT work for active (DRAFT) object

    Set oMsg = Client.ClientState.CommandMessage

    for x = 1 to oMsg.Recipients.Count
    set oRecipient = oMsg.Recipients.Item(x)
    msgbox oRecipient.EmailAddress & vbcrlf & oRecipient.TargetType
    set oRecipient = nothing
    next

    set oMsg = nothing

    #5582
    Support 3
    Participant

    – Is the message is draft (not send or saved) or standard message (received, sent, etc)?
    – How are you executing the code? For example, you need to execute the code “groupwise.ItemMessageIDFromView” when the message view is opened. We recommend to execute the applet from the message Toolbar to access the message ID.

    It could be a problem in your GroupWise client, you may need to upgrade to the latest point release.

    Regards,
    Advansys Support

    #5576
    brussill
    Participant

    The message is whats created when you click ‘New Mail’.

    I’ve also tried using GW 7.0.1 and most recent Formativ.

    #5575
    Support 3
    Participant

    Perhaps we are missing something, the example code works in here. Please see below the steps:

    – Create an applet and place the above sample code. Screenshot: http://www.screencast.com/t/lh9cWX3t
    – Set the applet integration to Email toolbar. Screenshot: http://www.screencast.com/t/FDsPnL_K1YW
    – Create a new message in GroupWise client, enter some recipients (To, CC, etc)
    – Run the applet from the message toolbar. Screenshot: http://www.screencast.com/t/gyFWPW2Ww

    Can you reproduce the same behaviour using the steps above?

    Regards,
    Advansys Support

    #5579
    brussill
    Participant

    Hi,

    I tried the suggested steps and still get empty <TO>, <CC>, <BC> in the message boxes… is there a security setting somewhere that is preventing me from getting the values?

    #5581
    brussill
    Participant

    ARGH. It and the other examples work for certain users… I’m trying to figure out how come some display and others do not.

    #5578
    brussill
    Participant

    It seems theres a user config conflict with some of the Novell users.

    The other thing, the msg.to_, msg.bc, msg.cc only return Novell validated users (which is not documented). Trying to figure out why some users are validated and others are not.

    #5580
    Support 3
    Participant

    We haven’t had any report about this issue. As you said in earlier post, the issue could be related to the security settings in your environment.

    quote:


    msg.to_, msg.bc, msg.cc only return Novell validated users (which is not documented)


    I have forwarded the comments to engineers for review.

    Regards,
    Advansys Support

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