Create Response Using Script While In Parent

Author: Tripp W Black

Created: 08/26/1999 at 07:51 PM

 

Category:
Notes Developer Tips
Actions, Agents, LotusScript, Parent/Child Documents

Author:
Kevin Merritt
Date:
Thursday, 3/04/99 4:52 PM EST
Subject:
Re: Creating a response doc on the fly




An associate of mine wrote this code that worked by running an agent when the button is pressed.
Email me if this code gets hosed on posting:

This is designed to work from the web.

Dim sessCurrent As New NotesSession
Dim dbCurrent As NotesDatabase
Dim docCurrent As NotesDocument
Dim Response As NotesDocument

Dim sID As String
Set dbCurrent = sessCurrent.CurrentDatabase
sID = Right$(sessCurrent.DocumentContext.Query_String(0), 32)
Set docCurrent = dbCurrent.GetDocumentByUNID( sID )
Set Response = dbCurrent.CreateDocument
Dim Item As New NotesItem(Response, "Author", "ACC", AUTHORS)

Response.Form = "groupresponse"
Call Response.MakeResponse(docCurrent)
Response.organization = "ACC"
Call Response.Save(True,True)

docCurrent.Flag = "Yes"
Call docCurrent.Save(True, True)
Print "[/" & dbCurrent.Filename & "/viewname?OpenView]"
Kmerritt@icfkaiser.com



previous page