Skip to main content

testControlOnRecord

Requires permission settings:controls:manage.

Shows what a saved control or an unsaved rule would decide for one existing record, condition by condition. Nothing is saved, recorded or sent for approval. Requires settings:controls:manage.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

query TestControlOnRecord($input: TestControlOnRecordInput!) {
testControlOnRecord(input: $input) {
notes
outcome
wouldRefuse
conditions {
actualNumber
actualFlag
actualText
fact
op
result
}
}
}

Variables:

{
"input": {
"documentId": "id",
"documentType": "string"
}
}

Response:

{
"data": {
"testControlOnRecord": {
"notes": [
"string"
],
"outcome": "string",
"wouldRefuse": true,
"conditions": [
{
"actualNumber": 0,
"actualFlag": true,
"actualText": "string",
"fact": "string",
"op": "string",
"result": true
}
]
}
}
}
testControlOnRecord(
input: TestControlOnRecordInput!
): ControlTestResultType!

Arguments​

testControlOnRecord.input ● TestControlOnRecordInput! non-null input​

The control or rule, and the record to test it on.

Type​

ControlTestResultType object​

What a control would decide for one record.