3

I am having a look at Case milestones and entitlement processes that are part of the service cloud. I want to programmatically close one of the milestones after a certain Status value has been selected in the Case object, as suggested in the Entitlements Best Practice page.

Use Apex code to automatically mark milestones as Completed on cases that match unique criteria. For example, you can create an Apex trigger on EmailMessage that marks a first response milestone as Completed on cases when support reps send email from cases.

However, when I wrote a trigger to attempt this I found out that the IsCompleted field of the CaseMilestone object seems to be unwritable. (I checked in workbench as well and it has updateable : false for the IsCompleted field)

How would I close the milestone as suggested in the best practices docs?

Thanks

4

You need to populate the CaseMilestone record's CompletionDate that will make the IsCompleted field true.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.