Question
How can we get DocumentID as a field?
Answer
1. Create a new Text Field "DocumentID" in your Document Definition.
2. In the Rules tab of the "DocumentID" field properties create a new Script Rule.
Make sure to disable the Read-Only option for the "DocumentID" field(it is on by default) and enable the rule.
3. Add the following script to the rule:
this.Field("DocumentID").Value = this.Document.Id;
This will allow us to set the value of the specified field to be equal to the DocumentID value for the current document.
Comments
0 comments
Please sign in to leave a comment.