• Creator
    Topic
  • #4435
    daveboy
    Participant

    Hi,

    I am trying to retrieve the FID for a mailbox using the AccountProperty(9) property of the Account object. This works fine for the root mailbox that a user logs into, but fails when the user is proxied into another mailbox. An error number of -2147352567 and description “Error retrieving GroupWise FID” is returned. I have added error checking to prevent the script failing. My code snippet is reproduced below:

    Set objAcc = client.clientstate.currentaccount
    strTemp=””
    On Error Resume Next
    strTemp=objAcc.AccountProperty(9)
    If strTemp=”” Then strTemp=”Could not be retrieved. Error: ” & Err.Number & ” (” & Err.Description & “)”
    On Error Goto 0

    The other property constants appear to work Ok (they certainly do not generate an error).

    I am using Formativ 2.0.2 Beta and GroupWise 8.0.1 client/agents.

    Regards

    Dave

  • Author
    Replies
  • #8172
    Support 3
    Participant

    We can reproduce the behaviour in here, looks like a bug in GroupWise Object API. We will contact Novell to get more information. In the meantime, you can also post a message in GroupWise Object API forum (http://forums.novell.com/novell-developer-forums/).

    Could you provide background information which will assist us understand the exact nature of what you are trying to achieve so that we may suggest any work-around.

    Regards,
    Advansys Support

    #8173
    daveboy
    Participant

    Hi,

    Thanks for the reply. We do not currently have an archiving solution, such as ArchiveToGo or GWAVA Retain, and the native GroupWise archiving is disabled for the majority of users. However, we need to allow certain users the ability to archive messages into personal archives.

    I am developing an applet that will run once daily on GroupWise startup and move messages exceeding a specified age (and other conditions such as folder, read/opened etc) to a central archiving server. The code includes a check to establish if there is an existing archive, so I need to know the FID for the mailbox so that I can build the archive folder name (of***arc), where *** is the FID.

    Regards

    Dave

    #8174
    Support 3
    Participant

    Thanks for the explanation.

    May be you can use the account email address which is unique. The code below uses the email address, it will remove any invalid characters (i.e. ?, :, etc) from the email address.

      
    Sub Main(Client, GWEvent)
    
      dim oAccount
    
      Set oAccount = client.clientstate.currentaccount
      msgbox ReplaceInvalidFileName(oAccount.owner.emailaddress)
      set oAccount = nothing
    
    End Sub
    
    
    
    ' Replace invalid characters from file name
    function ReplaceInvalidFileName(aFileName)
    
      Set oRegExp = New RegExp
      oRegExp.Global = True
      oRegExp.IgnoreCase = True
      oRegExp.Pattern = "[t""*/:;<>?\|]"
    
      ReplaceInvalidFileName = oRegExp.Replace(aFileName, "_")
    
      set oRegExp = nothing
    
    end function
    

    Hope this helps.

    Regards,
    Advansys Support

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