Manage Learn to apply best practices and optimize your operations.

Open Parent Of Response

I have started to use the following code in form action buttons on response
docs. It opens a response doc's parent. Other solutions I have found, like
@Command([ShowHideParentPreview]), only work if the response doc is in a view
that is hierarchical. I needed a solution that worked if I was in a view that
only shows responses, or when I was viewing a linked document from the results
of a LotusScript FTSearch -- like the results page in the Sigma demo db in the
Iris Sandbox, or the results of a search site database. This should work on any
response doc on any system.

Sub Click(Source As Button)
Dim ws As New notesuiworkspace
Dim session As New notessession
Dim db As notesdatabase
Dim uidoc As notesuidocument
Dim uiparent As notesuidocument
Dim doc As notesdocument
Dim parent As NotesDocument
Set db = session.currentdatabase
Set uidoc = ws.currentdocument
'...set value of response...
Set doc = uidoc.Document
Set parent = db.GetDocumentByUNID ( doc.ParentDocumentUNID )
Set uiparent = ws.EditDocument( False, parent, True)
End Sub

Dig Deeper on Domino Resources - Part 4

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...