Question
How to determine the Field with the corresponding error: "The document has hidden fields, some of which have warnings" in the document definition.
Answer
The following code, when added to the document-level event After document rules are checked, can be used to determine which (hidden) rule is throwing an error and preventing the verifier from closing the document:
string sErrors = "";
foreach (IRuleError ruleError in Document.RuleErrors)
{
foreach (IField f in ruleError.GetFields())
sErrors += f.FullName.ToString() + " ";
sErrors += " : " + ruleError.Message;
FCTools.ShowMessage(sErrors);
sErrors = "";
}
Just simply verify all the fields, after it, you will see the popup message indicating a full path to the field with the corresponding error message. See the sample screenshots:
Comments
0 comments
Please sign in to leave a comment.