- How to fetch the list of Milestone under the Entitlement Process of the Entitlement using Entitlement Name ?
You need to use Metadata API to fetch list of milestones under Entitlement process.
From Entitlement Name you can get SLAProcessId
, which Entitlement Process Id through SOQL query.
SELECT SlaProcessId FROM Entitlement WHERE Name = '<Entitlement Name>';
Refer EntitlementProcess Metadata API which has milestones
field referred to EntitlementProcessMilestoneItem
and from there you can fetch milestoneName
.
- Using CaseId fetch the Name Of the Milestones??
This SOQL I have given you earlier perfectly works for me.
[SELECT Id, Name FROM MilestoneType
WHERE Id IN
(SELECT MilestoneTypeId
FROM CaseMilestone
WHERE CaseId = '')]