How to check who modified the document?

Question

How to check who modified the document last time?

Answer

  1. The Service field with the Document last editor source can be created in the Document Definition:
    2022-08-22_12_24_19.png
  2. Alternatively, the following script can be added to the Script Rule of the field; the field should not be read-only in the rule settings:
    2022-08-22_12_26_43.png
    this.Field("Name").Text = FCTools.CurrentUserSession.UserName;   

    Then, add the following script to the After document state changed event handler :

    if (ChangedStates.Has(5) ) //check whether the document was verified
    {
       Document.Field("SectionName\\Name").CheckRules();
    }

     

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed