This subroutine searches for all the response documents for the parent document and updates the corresponding related fields between them.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
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)