/ Forums / Advansys Formativ / Creating Solutions with Formativ / How to Refresh the folder view in Groupwise

  • Creator
    Topic
  • #4406
    ML_NetBeh
    Participant

    Hi,

    I have made an applet to archive all messages in the selected folder, but after the applet has run the messages are still visible. Only after pressing the F5 button they disappear.

    What is the code to refresh the selected folder and sub-folders?
    Below the code i’m currently using, but the last two refresh lines doesn’t seem to work

    dim oFolder
    dim blnRun

    Sub Main(Client, GWEvent)

    set oFolder = client.clientstate.selectedfolder
    blnRun = False
    MainForm.lblInfo.Caption = “Moving all messages to ARCHIVE in folder: “+ oFolder.Name

    if (oFolder.ObjType <> fgwMailbox) then
    MainForm.ShowModal
    ‘call ArchiveMessages(oFolder,MainForm.chkSubFolders.Checked)
    else
    msgbox “Not allowed here.”
    end if

    oFolder.Refresh
    Client.ClientState.CurrentAccount.Refresh

    set oFolder = nothing
    End Sub

  • Author
    Replies
  • #8105
    Support 3
    Participant

    Are you running Online or caching mode? You can try the sample code below to refresh the client.

        ' If caching/remote account then refresh the UI.
        if groupwise.account.remote then
          GroupWise.Refresh
        end if  
    

    Hope this helps.

    Regards,
    Advansys Support

    #8106
    ML_NetBeh
    Participant

    Thanks, that worked Smile

    Other Question:

    How can i check if the cleint is connected to the Archive database, because “groupwise.account.archived” gives me in both modes (caching/archive) the answer false.

    #8107
    Support 3
    Participant

    Could be a bug in GroupWise API, code below appear to work as expected.

      
      if not (Client.clientstate.currentaccount.proxied) then
        msgbox client.clientstate.CurrentAccount.archived
      end if
    

    Regards,
    Advansys Support

    #8109
    ML_NetBeh
    Participant

    Yes it does, Thanks

    #8108
    Support 3
    Participant

    Great, thanks for letting us know.

    Regards,
    Advansys Support

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