Loading
Salesforce now sends email only from verified domains. Read More
Insurance
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          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