Milestone Completion Date Error

  • This topic has 1 reply, 1 voice, and was last updated 1 month ago by Admin.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1127 Reply

    I’m trying to write a trigger for Case that will reopen or uncomplete the Final Milestone in the Entitlement Process for that Case. I have run up against getting an error

    “FIELD_INTEGRITY_EXCEPTION, You can’t change the Completion Date on a Milestone that’s already exited an Entitlement Process”

    • This topic was modified 2 years, 9 months ago by Admin.
    #1129 Reply

    If the Case is already in Closed status and if you have any processes to update the Milestone Completion Date, you will run into this error.

    Update the CaseMilestone before the case saves as closed as the milestone must already be closed when the case is closed. Use a before update trigger on your case, and make sure that you update your completion date prior to closing the case. You can use for picking the time.

    SOQL to update CompletionDate:
    SELECT Id, CompletionDate FROM CaseMilestone WHERE CaseId = ‘<Case Id>’

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Milestone Completion Date Error
Your information:

error: Content is protected !!