I have a date field, I want a user to be able to create a date, but not have this user able to edit the data after that. I want to use MGR role to allow MGR to edit this date.
I am able to do this for the WHOLE form, however I am NOT able to do this JUST for ONE field / date field...
Here's my code I use on Querymodechange
Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
Dim curdoc As notesdocument
If Not ( source.EditMode ) Then
'user_roles = Evaluate( "@UserRoles" )
Forall role In user_roles
If ( role = "[MGR]") Then
If curdoc.STATUS(0)="Open" Or curdoc.STATUS(0)="On Hold" Then
and under Postmodechange
Sub Postmodechange(Source As Notesuidocument)
Dim status As String
status = Source.FieldGetText("Status")
Call Source.FieldSetText("StatCheck" , Status)