/ Forums / Advansys Formativ / Creating Solutions with Formativ / CurrentItem.To_ and CurrentItem.Sender not working for me

  • Creator
    Topic
  • #4068
    Anonymous

    following is a code snip.

    1: dim msgSubj, msgDate, msgTo, msgSender

    much more code…

    2: msgSubj = trim(iMessage.Subject)
    3: msgTo = trim(iMessage.To_)
    4: msgSender = trim(iMessage.Sender)

    line 2 works fine. Line 3 and 4 do not.

    I get an error saying:

    Formativ Applet runtime error
    C:Documents and SettingsdeveloperLocal SettingsApplication DataAdvansysFormativ1.0Cache{24F7CE59-3573-47A1-BFD9-B21BEF35AE55}mail_archive.vbf
    Object doesn’t support this property or method: ‘iMessage.To_’ at line 111, column 6

    yet in my documentation I downloaded a few days ago:

    CurrentItem.To_() : String
    CurrentItem.Sender() : String

    are the names of the properties. I am very confused as to why this does not work since line 2 works fine. The app wored fine with only line 2, until I tried to extend it with line 3 and 4 listed here.

    Please assist.

    Thanks,

    Neal Vadekar

  • Author
    Replies
  • #7004
    Support 1a
    Participant

    It sounds like you might be confusing the CurrentItem object with the native GroupWise Message object. The CurrentItem.To_ and CurrentItem.Sender properties are properties of the CurrentItem object. The CurrentItem property is accessed via:

    Set iMessage = GroupWise.ComposingItem

    This is only valid if the currently selected item is being composed.

    On the other hand, the native GroupWise Message object, which is used to access messages that already exist in the message store (99% of messages you deal with) is different. It doesn’t have a .To_ property, for example. This would explain the error about an unsupported property.

    The properties available to you when using a Message object are documented here. Don’t forget to look at any message type specific subclass on the same site for message specific properties and methods.

    I hope this helps.

    Advansys Support

    #7002
    Anonymous

    ok, this is still not clear to me.
    here is some code I should have sent you the first time I asked this question:

    set iMessages = Client.ClientState.SelectedMessages ** working
    …lots of code…
    set iMessage = iMessages.item(cMsg) ** working
    …lots of code…
    msgSubj = trim(iMessage.Subject) ** working
    msgTo = trim(iMessage.To_) ** not working
    msgSender = trim(iMessage.Sender) ** not working

    the problem I have is there appears to be no such object as Client.ClientState.SelectedMessages, I cannot find any reference to it in any of the downloadable manuals your web site offers. I also not not see it on the groupwise site. I am trying to modify a working program by added the msgTo, msgSender lines to the code. But I am not able to see the class definitions that were used to get this working in the first place.

    Please assist.

    Thanks.

    #7003
    Support 1a
    Participant

    Client.ClientState.SelectedMessages is documented at http://developer.novell.com/ndk/doc/gwc3po/gwc3penu/data/hye3ji8g.html

    The line set iMessage = iMessages.item(cMsg) sets iMessage to a native GroupWise Object API Message object. A native GroupWise Message object is a different thing to a ComposingItem object. The ComposingItem object has a property called .To_. The native Object API Message object does not. By accessing the Client.ClientState.SelectedMessages collection, you are working with native Object API message types.

    The native Object API Message object is documented at http://developer.novell.com/ndk/doc/gwobjapi/gwobjenu/data/hrgfssmm.html. Please see this link for the properties you can use. Note that you will need to work with the Recipients property of the message object in order to access the ‘To’ information.

    I hope this clarifies the situation.

    Regards,

    Advansys Support

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