How to determine the Field with the corresponding error: "The document has hidden fields, some of which have warnings" in the document definition.
Add the following code to the Project Properties > Event Handler > After document state changed if default batch type is used or Batch Type Properties > Event Handler > After document state changed if some custom batch type is used:
string sErrors = "";
foreach (IRuleError ruleError in Document.RuleErrors)
foreach (IField f in ruleError.GetFields())
sErrors += f.FullName.ToString() + " ";
sErrors += " : " + ruleError.Message;
sErrors = "";
- In the Project Setup Station, create a batch of the required batch type.
- Load a document there and recognize it.
- Expand the recognition task log.
- There will be messages listing all errors and warnings for all fields (including hidden ones):
Please sign in to leave a comment.