Agent not displayed in "Actions" Menu

Hi,

I’ve got this button that enables users to copy an agent on a server and paste it in the address book.

The copy-paste works, only the agent is not displayed in the Actions menu. I have to open the agents list (View → Agents) in the address book for it to be displayed.

Is there a way to refresh this Actions menu ?

The code of the button in case it’s relevant :

Sub Click(Source As Button)

On Error Goto errhand



Dim ws As New NotesUIWorkspace

Dim session As New NotesSession

Dim uidb As NotesUIDatabase

Dim serverdb As NotesDatabase

Dim pnabdb As NotesDatabase

Dim doc As NotesDocument

Dim findSt As String

Dim replaceSt As String

Dim localAgent As NotesAgent



REM check pnab existence

Call ws.OpenDatabase("", "names.nsf")	

Set uidb = ws.CurrentDatabase

Call uidb.Close

Set pnabdb = session.GetDatabase("", "names.nsf")	

If Not pnabdb.IsOpen Then

	Msgbox "Unable to open your Personal Address Book. Please contact the person who sent you this e-mail and mention this specific error.",,"Alert"

	Exit Sub

End If

pnabIsOpen :

Set serverdb = session.GetDatabase("server-01", "Development\AgentsRepository.nsf")

Set doc = serverdb.GetDocumentByID("000052DA")

If Not doc Is Nothing Then

	Call doc.CopyToDatabase(pnabdb)

	Msgbox "You'll find the agent in your address book (Actions Menu)"

Else

	Msgbox "Unable to copy agent. Please contact the person who sent you this e-mail and mention this specific error.",,"Alert"

End If



Exit Sub

errhand:

Msgbox "Error: "+Error$+Chr(10)+"Please contact the person who sent you this e-mail and mention this specific error.",,"Error ("+Format$(Err)+") - "+Format$(Erl)

Exit Sub

End Sub

Subject: Have you tried refreshing the Agents list view with LotusScript?

You can set a flag in the Domino Directory profile or notes.ini that triggers some LS code to refresh the Agent Lists view upon opening the database.

Subject: Didn’t try, don’t know how

thanks for you answer Murray !but, uh, how do you do that exactly ? I haven’t got the first clue, it would be great if you could give more details. I had this idea but couldn’t find anything useful in the designer help…