Hi
I want to add a bit of code to the querysave of the _Calendar Entry form to check on a field value and prevent the save and close of the entry.
I can prevent the save, but the entry always closes if the user has clicked the ‘Save and Send Invitations’ action.
The action has the formula:
FIELD tmpAction := “6”;@If(@PostedCommand([FileSave]);
@PostedCommand([FileCloseWindow]); “”)
Which seems to me to say the if the save doesn’t happen, don’t close.
The code I’ve added to my querysave, before any of the normal code is:
If source.isnewdoc And source.FieldGetText(“LogUNID”) = “” And source.FieldGetText(“AppointmentType”) = “Meeting” Then
Dim ans As Integer
Dim w As New notesuiworkspace
ans = w.prompt(2, "Contact Log", "Are you sure you want to send without creating and contact log?")
If ans = 1 Then
continue = False
Exit Sub
End If
End If
The LogUNID field is a new one I’ve added to the form, which basically is a central store of logs of meetings with clients.
Anyone know how I can achieve what I’m attempting to do?
Thanks
Dan