Hi I am using sequential milestone in our project.

We also have initial response and resolution time milestones working on case. Sequential milestone we used to send an update to the customer between specified time. so when we send first update it gets stopped and reschedule again. It works perfectly.

The problem is when case is closed at that time resolution time milestone is get stopped but update(sequential) milestone still running. It doesn't make any sense to send the update when case is closed

Could anyone provide me the solution how to stop this sequential milestone completely after closing the case??

  • whats the criteria you have specified for sequential milestone firing Feb 15, 2018 at 17:12

3 Answers 3


I faced this issue earlier. Generally, you can close the Milestones by a trigger that automatically marks milestones Completed on cases that match unique criteria. But in case of Sequential Milestone, it will create another Milestone as soon as you close one. To resolve this, I removed the Entitlement from the Case as soon as it closes. It worked for me.

Examples as mentioned in the Salesforce Help Article. The change I made is c.EntitlementId = null;


trigger CompleteResolutionTimeMilestone on Case (before update) {
    if (UserInfo.getUserType() == 'Standard'){
        DateTime completionDate = System.now(); 
        List<Id> updateCases = new List<Id>();
        for (Case c : Trigger.new){
            if (((c.isClosed == true)||(c.Status == 'Closed'))&&((c.SlaStartDate <= completionDate)&&(c.SlaExitDate == null))){
                c.EntitlementId = null;
        if (updateCases.isEmpty() == false){
            milestoneUtils.completeMilestone(updateCases, 'Every 10 Minute Response', completionDate);

Util Class

public class MilestoneUtils {
    public static void completeMilestone(List<Id> caseIds,String milestoneName, DateTime complDate) {  
        List<CaseMilestone> cmsToUpdate = [select Id, completionDate
                                           from CaseMilestone cm
                                           where caseId in :caseIds and cm.MilestoneType.Name=:milestoneName 
                                           and completionDate = null limit 1];
        if (cmsToUpdate.isEmpty() == false){
            for (CaseMilestone cm : cmsToUpdate){
                cm.completionDate = complDate;
            update cmsToUpdate;
  • Thanks for your reply. I have used your logic. I have removed entitlement when case status is updated to closed. I have done it through trigger and it works for me. Thanks a lot !!!!!
    – user49343
    Feb 16, 2018 at 6:23
  • Actually i was facing one issue while using above solution. when entitlement is removed that cases not comes under the respective entitlement. so what i did i remove the entitlement process (not entitlement) through trigger and in next line of code i again assigned that process to case. Due to this the milestone get completed and still showing for respective case and due to reassignment milestone are starting when new case is created for same entitlement.
    – user49343
    Feb 23, 2018 at 14:08

I've worked with independent milestones, and I had the same issue. instead of working with code, i've create two checkboxes 'Response milestone disabler' and 'Resolution milestone disabler'

my use case was:

  • whenever the case is created, the response (and resolution) milestone(s) should be triggered
  • whenever I reply to the case, the status should be changed to Resolved or Waiting for customer response --> I worked with a flow that will first set the response milestone to complete and then select the checkbox of the response disabler so that the milestone isn't triggered anymore : Et voila!
  • when customer replies again (linked to same case based on thread ID), status changes to customer replied: checkbox is deselected again, and milestone is triggered again.
  • same logic for the resolution milestone


I guess the same will work with sequential: just add a checkbox to the criteria and make use of lightning flow to check and uncheck this checkbox.


Code is not needed to accomplish this. All you need to check is that Status is not Closed in the Milestone Criteria on the Entitlement Process.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .