PicklistCollection from Dialogbox

After a new documen is created, a dialogbox (NotesuiWorkspace.Dialogbox . …) is opened. On that box the is a dialoglist-field. One of the selections have to bring up a View (by the LS PicklistCollections) But is says: Cannot execute the specified command.So I am trying to close tha dialogbox first.

This code does not work:

Sub Onchange(Source As Field)

Dim w As New NotesUIWorkspace

Dim tuidoc As NotesUIDocument

Set tuidoc=w.CurrentDocument

Call tuidoc.Refresh

Dim s As New NotesSession

Dim db As NotesDatabase

Set db=s.CurrentDatabase

Dim pdoccol As NotesDocumentCollection

Dim pdoc As NotesDocument

Call tuidoc.Close(True)

Set pdoccol=w.PickListCollection(PICKLIST_CUSTOM,False,db.Server,“dossierbeheer.nsf”,“Dossiersopnaam”,“Prijslijst Selectie”,“Kies een dossier”)

End Sub

When I comment the line with PickListCollection, I get the error:NotesUIDocument is no longer valid.

So, How can I bring up a Picklist from a dialogbox?

Koos van Harmelen

Subject: PicklistCollection from Dialogbox

You should try to place a button on the Dialogbox instead of doing it on the OnChange event it might be a Notes limitation.

Francis

Subject: RE: PicklistCollection from Dialogbox

Thanks for your reply.

I tried it, but no change in trouble.

What I want is: The user clicks a selection in a list-field, or clicks a button, both on a dialogbox. Then a picklist should appear.

This is not happening.

Koos

Subject: RE: PicklistCollection from Dialogbox

I believe the problem is the view has ViewCollapseAll in Post Open or something similar