Hi,
I have the following formula in QuerymodeChange:
u := @Name([CN];@UserName);
@If( u = “the right person” ; @Success ; @Failure("You are not authorized to edit the document))
For some reason when the wrong user opens the document he can change the doc.
Please help
Jacob
Subject: QuerymodeChange Formula
@Success and @Failure are intended to be used only in input validation formulae. @Failure will not stop the user from changing the mode. From Designer Help:
“@Failure is mainly used in input validation formulas for editable fields, although you can also use it in agents and form formulas. When @Failure is used in formulas other than input validation formulas, the result is the input string; Lotus Notes/Domino displays no prompts or messages.”
You’ll probably want to go with LS instead; something like this:
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
Dim s as new notessession
If s.commonusername <> “the right person” then
Msgbox “You are not authorized to edit the document.”
Continue = False
else
Continue = True
end if
End Sub