Instance member…does not exist’ when enabling Out Of Office

Today I had a lot of calls in our helpdesk regarding Out Of Office. Users complained that the had enabled the agent before Christmas and it worked fine but when they tried to disable the agent it does not disable. Instead the Out Of Office profile shows the following message:

Even it is in German, I think I do not have to translate the blue text as you might know that this is the message that is displayed when a user has editor access to his mail file and tries to enable / disable the Out Of Office agent.
With editor access an administration request is created that will enable / disable the agent on behalf of the user.

Well, nothing special so far. Except the fact that this message is displayed to the user all day long and I could not find any administration request on the server.

I tried to reproduce the error on my workstation but failed. I opened the users desktop remotely and there it was. An error message occurred in the statusbar stating that there is a

Notes error: 182 Instance member CONFIGUREMAILAGENTTEXT does not exist.

I searched the Knowledge Base for CONFIGUREMAILAGENTTEXT and found this technote

In Lotus Notes®, you attempt to enable the Out Of Office (OOO) agent in your mail file. The agent does not enable and you notice the following error message in the status bar of the Notes client:

“Notes error: 182 Instance member CONFIGUREMAILAGENTTEXT does not exist.”

This issue only occurs for users with Editor access to their mail file and only occurs in Notes, regardless of the mail template design being used. The issue does not occur when using Lotus Domino® Web Access (DWA) mail.

So, what has happened?

On December, 29th, 2007 I did a mass change on the users mail files to ensure that all ACL only have editor access with all options set except ‘Can Create personal agents’.

We use Domino server version 7.0.3 and Notes Client version 7.0.2 with a slightly modified dwa7.ntf mail template. The changes do not touch the Out Of Office profile !

Reading the technote mentioned before, I found the following hint:

NOTE: The DWA7 client that ships with the Notes/Domino 7.0.2 release is incompatible with all previous versions of Notes.

All previous versions of Notes? Does this mean version 7.0.1, too ?
To make a long story short; yes it means that version 7.0.1 is not compatible with dwa7.ntf shipped with client version 7.0.2.

And yes, we have some clients still using this version. Exactly the same users who are not able to disable the Out of Office agent are on this ‘old’ client version.

To solve the puzzle, I will have to update the clients ASAP J

Another option ( according to the technote ) is to grant designer access. I used the following code to do the changes out of the Domino Directory.

Create a new agent in the DD ( Select from menue, All selected documents ) and copy the following code into the agent.

Option Public
Option Declare

'Use "OpenLogFunctions"
Sub Initialize
	'On Error Goto Errorhandler
	Dim ws As New NotesUIWorkspace
	Dim session As New NotesSession
	Dim db As NotesDatabase
	Dim dc As NotesDocumentCollection
	Dim doc As NotesDocument
	Dim total As Long
	Dim docnum As Long

	Set db = session.CurrentDatabase

	Set dc = db.UnprocessedDocuments
	total = dc.Count
	docnum = 0

	Set doc = dc.GetFirstDocument
	While Not doc Is Nothing
		docnum = docnum + 1
		Call UpdateStatusBar(docnum, total)
		Call ProcessPersonDoc(doc)
		Set doc = dc.GetNextDocument(doc)

	Call ws.ViewRefresh
	'Exit Sub

	'Call LogError
	'Exit Sub

End Sub

Sub UpdateStatusBar(x As Long, total As Long)
	'This will display the percentage complete in the status bar as the agent runs

	Print "Working..." & Cstr(Round((x / total), 2)*100) & "% done"

End Sub

Sub ProcessPersonDoc(doc As NotesDocument)
	'On Error Goto stackError
	Dim s As New NotesSession
	Dim profile As NotesDocument
	Dim owner As String
	Dim ACL As NotesACL
	Dim ACLEntry As NotesACLEntry
	Dim nn As NotesName

	Dim Maildb As New NotesDatabase( doc.MailServer(0), doc.MailFile(0) )
	If Maildb.IsOpen Then
		Print( "Succesfully opened " & Maildb.Title )
		Set profile = Maildb.GetProfileDocument("CalendarProfile")
		Set nn = s.CreateName ( profile.Owner(0) )

		Set ACL = MailDB.ACL
		Set ACLEntry = ACL.GetEntry ( profile.Owner(0) )
		If Not ( ACLEntry Is Nothing ) Then
		End If

		'Set OWNER access to DESIGNER
		Set ACLENtry = New NotesACLEntry ( ACL, profile.Owner(0), 5 )
		ACLENtry.CanDeleteDocuments = True
		ACLENtry.CanCreateLSOrJavaAgent = True
		ACLENtry.IsPerson = True

	End If

	'Exit Sub
	'Call LogError()
End Sub

Now you can select one or more persons and run the agent against their mail file. The agent will read the calendar profile to determine the mail file owner and then changes the ACL.