You need to sign in to do that
Don't have an account?
Case field update after milestone processing
Seeking a way to update case field after milestone processing. We have tried several options like flow with process builder, apex trigger (with/without @Future annotation) but ... whatever we try .... case field is not updated.
To sketch the scenario:
On the case, we would like to have a field to contain the deadline for the active milestone. So when we complete the current milestone ... this custom field get's populated with the deadline.
Now we can do this whenever a field update on the case has been performed ... but it seems that milestone processing takes place after triggers and after process builder. I have seen some samples out there but ... I'm having a hard time to get this working while it sounds so easy.
- milestone is completed / case deadline is populated by next milestone
All help & support is much appreciated.
To sketch the scenario:
On the case, we would like to have a field to contain the deadline for the active milestone. So when we complete the current milestone ... this custom field get's populated with the deadline.
Now we can do this whenever a field update on the case has been performed ... but it seems that milestone processing takes place after triggers and after process builder. I have seen some samples out there but ... I'm having a hard time to get this working while it sounds so easy.
- milestone is completed / case deadline is populated by next milestone
All help & support is much appreciated.
I just started working with Milestones, and in building out my requirements, I ran in to the exact same issue you described here. I can't seem to update the parent Case when the Milestone is changed.
In my particular situation, I'm simply trying to push the Target Date up to a field on the parent Case when the Milestone is created.
Did you happen to find a solution to the problem?
(If anyone else is reading this, and wondering why you'd want to do such a thing... it's because I'd like to display the Target Date in Case List views).
The problem I was having, stems from the fact that whatever Salesforce is doing to create/edit/update the Milestone records, that functionaly comes after Triggers/Process Builder etc execute.
If I were writing a Trigger to push the data up to Case, it looks like I could do this with an @Future method, which delays the update until after all the Milestone changes have been made:
http://blog.deadlypenguin.com/blog/2015/07/29/service-breach-time-displaying-it-on-the-case/
But I try to avoid code if there is a declarative solution. So in my situation, I've created a Process Builder that runs when an "Entitlement" is added to a Case. It then does a Scheduled Action "0 Hours after LastModified Date" (which mimics @Future). The Scheduled Action runs a Flow, which picks the Milestone record with the latest Target Date, and updates the Case with that value.
It ain't pretty... but it works.