Domino Code Fragment

Code Name*
PostOpen Code to check we have correct Parent document
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.137.171.121
Description*
Checks the selected document from which we are creating reponse to ensure we have the correct parent form. If not Display error message and close response document.
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:

Create Hidden Computed when Composed OtherField on response document.

Have it compute to Form

Sub Postopen(Source As Notesuidocument)
    Dim otherform As String
    ' Grab form information from otherform field to ensure we have the correct parent
    otherform = source.FieldGettext("OtherForm")
    ' Lets ensure we are in a new document
    If Source.IsNewDoc Then
         ' If parent form is incorrect then we display message and close this form
         If otherform <> "Company" Then
              Messagebox "Please Hi-Light Company Profile!", 16, "Selection Error"
              Call source.close
         End If
    End If
End Sub