Loading
Service Disruption- Multiple Hyperforce CellsRead More
PHP Vulnerability Monitoring Read More
The online Trailblazer Community becomes read-only Oct 30, 2026Read More
Insurance
StateRuleService:getTransitionStates

StateRuleService:getTransitionStates

Use this service to get default transition states, the To state of each from state transition, the current state, and the last default state for the target object.

Class: StateRuleService

Method: getTransitionStates

How It Works

  1. The service retrieves the object specified by the objectId option.

  2. The service retrieves the object specified by the objectId option.

  3. The current state is retrieved from the object.

  4. If the object has log entries, the latest log entry is retrieved and the lastDefaultState value is returned as well as any associated failure messages.

    If the object has no log entries, the lastDefaultState is returned as null and an empty list is returned for the failure messages.

Remote Options

Option

Description

objectId

Id of target object to retrieve state informations

Input JSON

{ 
    "objectId": "02i3h0000009OqCAAU"
}

Output JSON

{
    "defaultTransitionStates": ["Draft", "Submitted", "Approved", "Underwriting"],
    "eachStateToStates": {
        "Underwriting": ["Approved"],
        "Submitted": ["Approved", "Decline", "Underwriting"],
        "Draft": ["Submitted"],
        "Approved": ["Issued"]
    },
    "currentState": "Submitted",
    "lastDefaultState": "Draft",
    "failureMessages": [{
        "name": "Rule 1",
        "message": "Failure Message"
    }, {
        "name": "Rule 2",
        "message": "Failure Message"
    }]
}
 
Loading
Salesforce Help | Article