This subroutine searches for all the response documents for the parent document and updates the corresponding related fields between them.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
Sub UpdateResponseField (docParent As NotesDocument, parentFieldName As String, responseFieldName As String)
Dim docCollection As NotesDocumentCollection
Dim docResponse As NotesDocument
parentValue = docParent.GetItemValue(parentFieldName)
Set docCollection = docParent.Responses
If docCollection.Count <> 0 Then
For i=1 to docCollection.Count
Set docResponse = docCollection.GetNthDocument(i)
If Not docResponse Is Nothing Then
Call docResponse.ReplaceItemValue(responseFieldName, parentValue(0))
Call docResponse.Save(True, False)