/ Forums / Advansys Formativ / Creating Solutions with Formativ / programmatically activate an account / Reply To: programmatically activate an account

Support 3


    Originally posted by Support 3:
    Unfortunately you can not use the quick messages collection on a proxied account. See the Object API note about the GetQuickMessagesCollection method:


    QuickMessages GetQuickMessagesCollection(Date StartDate, QuickMessagesCreationConstants eHowBuildList)

    The QuickMessages collection should return message items quicker than other ways (such as the AllMessages collection or querying objects with their message lists). It is very fast when returning new messages, but retrieving modified messages is somewhat slower. The slowest is to retrieve all messages from an account.

    GetQuickMessagesCollection should be called only on a main account. Calling this method from a Proxy account results in an error.

    Messages in a folder that have been shared do not appear in the resulting QuickMessages collection. These folders are not part of the user’s database and are outside of the account.

    Folder contains a similar method. However, the Account object method uses every message in the account, while the Folder object method looks through message items that are in the specified folder.

    NOTE:This method does not return hidden messages. For GroupWise 6.5, SP3 and later versions, call the GetQuickMessagesCollectionExt method to return hidden messages.

    This method is available only in GroupWise 6.5, SP 2 and later versions.

    Seems like you have to use the Allmessages method on a proxied account and GetQuickMessagesCollection method on the main login account. See the sample code below. You can modify the filter expression to specify date, message type, etc.

      if Client.clientstate.currentaccount.proxied then
        set oMessages = Client.clientstate.currentaccount.Allmessages.Find("(NOTE)")
        msgbox oMessages.count
        set oMessages = groupwise.account.GetQuickMessagesCollection(date, 1)
        msgbox oMessages.count
      end if

    Hope this helps.

    Advansys Support