I had a requirement where you Click on a button which would launch a VisualForce page and on updating the record the Status was supposed to be set to Closed and then Case Entitlement and MileStones to be set for such a Case.
Problem: I would get the error "You can’t change the completion date on a case milestone that’s already exited an entitlement process.: Completion Date: [CompletionDate]"
Solution
Essentially, the root of the problem is that the Case is already in Closed status by the time your process or logic to update the MileStone Completion Date comes along. When it tries to update a Case whose status is already Closed you get the above error.
Review your development and design and basically introduce a delay by setting some Boolean variables. Ensure that the Case Milestone Completion Date is being set before the case status is set to Closed.
Once the delay is introduced and the sequencing works as above the error will be resolved.
Problem: I would get the error "You can’t change the completion date on a case milestone that’s already exited an entitlement process.: Completion Date: [CompletionDate]"
Solution
Essentially, the root of the problem is that the Case is already in Closed status by the time your process or logic to update the MileStone Completion Date comes along. When it tries to update a Case whose status is already Closed you get the above error.
Review your development and design and basically introduce a delay by setting some Boolean variables. Ensure that the Case Milestone Completion Date is being set before the case status is set to Closed.
Once the delay is introduced and the sequencing works as above the error will be resolved.