Getting operator role id


I have different operator roles enabled in our project and I have a field in the document definition.

The field has the following script

Context.Text = FCTools.CurrentUserSession.RoleId.ToString();

The issue is that I have to refresh the field manually everytime to update the role id.
How can I get the operator id value to update as soon as the user opens the document?





1 comment

  • Avatar
    Adrian Enders

    Perhaps this will work: go into your Doc Def Properties. There is a tab called "Event Handlers" and a Handler named "After document rules are checked". Put your script there. You will have to reference the field by name in the script:

    Document.Field("OperatorID").Text = FCTools.CurrentUserSession.UserName;

     If I understand this correctly, the rules are checked when someone opens the document. I'm not certain this will work for you, but worth a shot.


Please sign in to leave a comment.