Loading
Prepare for Email to Become the Default Login ExperienceRead More
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Important Advisory: iOS Update Impacting CG Mobile ApplicationRead More
Insurance
StateRuleService:getRuleLogs

StateRuleService:getRuleLogs

Use this service to retrieve rule logs for a target object, sorted by execution date in ascending order.

Class: StateRuleService

Method: getRuleLogs

How It Works

  1. This service retrieves logs by querying the ObjectAppliedResult__c table to see if there are any rows with a RecordId__c corresponding to the target object.

  2. If such rows exist, the service transforms the rows and returns to the caller in ascending order according to the AppliedDateTime_c field.

Remote Options

Option

Description

objectId

Id of the target object for which to retrieve rule logs

Input JSON

See the following sample of input JSON.

{ 
	"objectId": "02i6g000000I21EAAS"
}

Output JSON

See the following sample of output JSON.

{
    "result": [{
        "id": "a1a6g00000087E9AAI",
        "objectId": "02i6g000000I21EAAS",
        "stateTransitionId": "a1Z6g000000HzX1EAK",
        "stateTransitionName": "Draft to Submit",
        "executionDate": "2020-01-01T00:00:00.000Z",
        "results": [{
            "id": "a5Q6g0000005vSPEAY",
            "name": "Check Auto Year",
            "condition": "Auto.Year > 1990",
            "message": "Auto year is greater than 1990",
            "action": null,
            "result": true,
            "details": {
                "instanceKey": "2002 Toyota Camry"
            }
        }]
    }, {
        "id": "a1a6g00000087E9AAL",
        "objectId": "02i6g000000I21EAAS",
        "stateTransitionId": "a1Z6g000000HzX1EAP",
        "stateTransitionName": "Submit to Underwriting",
        "executionDate": "2020-01-05T00:00:00.000Z",
        "results": [{
            "id": "a5Q6g0000005vSPEAZ",
            "name": "Check Auto Make",
            "condition": "Auto.Make == 'Lexus'",
            "message": "Auto is a Lexus",
            "action": "Move to Underwriting",
            "result": false,
            "details": {
                "instanceKey": "2002 Toyota Camry"
            }
        }]
    }]
}

Results Description

This JSON includes these key/value pairs.

Key

Values

id

Id of rule

name

Name of rule

condition

Rule condition

message

Success message if rule condition evaluated true against target object

Failure message if rule condition evaluated false against target object

action

Name of action executed if rule condition evaluated true

result

Result of rule condition evaluation against target object

details

Map of information associated with the target object

 
Loading
Salesforce Help | Article