I am trying to create a custom visualforce page that is aware of the Case Status Values that are related to a specific Case Support Process.
I am able to get all Status Picklist Values from a Describe method:
Schema.DescribeFieldResult fieldResult = Case.Status.getDescribe(); List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
Or I can get there Case Status values from the CaseStatus sObject:
SELECT Id, MasterLabel, ApiName, SortOrder, IsDefault, IsClosed FROM CaseStatus
I can get information about the Support process from the BusinessProcess sObject:
SELECT Id, Name, Description, TableEnumOrId, IsActive FROM BusinessProcess
However I can find no way to link the Case Status Values programatically to a defined Business Process. This can be seen in the UI below. I need to identify Programatically the Selected Case Statuses for a specified Support Process.