Documentation Index
Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
Use this file to discover all available pages before exploring further.
Context is a global object that provides access to the document being processed, its fields, and the parameters of the enclosing transaction. Set CheckSucceeded to indicate whether the rule passed.
Properties
CheckSucceeded
Type:bool — Access: Read-write
Indicates whether the rule condition is fulfilled. Defaults to true. Set it to false if the condition is not met. In that case, the default error message shown to the operator is Error in the rule <rule_name>: <field_name>. To customize the message, set the ErrorMessage property.
An error is generated only when your script sets
CheckSucceeded to false. If the script doesn’t set it explicitly, no error is displayed — even if the rule conditions aren’t met.CurrentField
Type: Field — Access: Read-only The field checked by the rule. For repeating fields in repeating rules, this is the specific instance being checked by the current call. Returnsnull if the rule references the document as a whole.
Document
Type: Document — Access: Read-only The document for which the rule runs.ErrorMessage
Type:string — Access: Read-write
Custom message displayed when the script sets CheckSucceeded to false. If unset, the default message is Error in the rule <rule_name>: <field_name>.
Transaction
Type: Transaction — Access: Read-only The current transaction.Methods
GetField
BusinessUnit/Address.
When used in a repeating rule, GetField sequentially returns each processed field instance. Otherwise, it returns the first instance of a repeating field.
GetFields
GetCatalogRecord
Available only if the catalog has a record identifier configured (for example, a vendor identifier).
SkillParameter
Available only if the Document skill has at least one parameter.
Related topics
Object model
Full JavaScript object reference for use in Advanced Script Rules.
Business rules automation
Add scripted rules to a Document skill, configure readable and writable fields, and reference table columns.
Field
The Field object — inspect and modify a document field during rule execution.
