Domino Code Fragment

Code Name*
Update the parent document from response doc.
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.19.31.73
Description*
It will check the document is being saved and if a field exist called $Ref (which is on reponse docs) it will look at the parent and change the "Status" field to "Updated"
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:

Author: Ray LaTulippe (Romac International)  

Date: Tuesday, 8/25/98 4:20 PM EDT  
Subject: Re: Update the parent document from response  


The following code should be added to the response forms querysave event.

Sub Querysave(Source As Notesuidocument, Continue As Variant)
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim parent As NotesDocument
Dim doc As NotesDocument
Dim parentUnid As String
Set doc = Source.document
If doc.HasItem( "$Ref" ) Then
Set parent = db.GetDocumentByUNID( doc.ParentDocumentUNID )
parent.Status = "Updated"
Call parent.Save( True, True )
End If
End Sub