function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jinky salvadorjinky salvador 

Incorrect Case Milestone Target Date

Hi,

I'm currently facing an issue in computing for Case Milestone Target Date. I used calculateMilestoneTriggerTime method of MilestoneTriggerTimeCalculator interface to caluculate the trigger time. This method returns the value(in minutes) which will be added to the Case Milestone Start Date to get the Target Date. When I debug the value of Target Date it gives me the correct date and time, but the actual Target Date displayed on the Case Milestone page layout is different. Is there any other internal logic that is applied on top of the value output from this method?

Here are sample data:

1. Start Date : 2015-02-11 07:58:12
    Method Returns (in minutes) : 131048
    Target Date displayed on Debug Log: 2015-05-13 08:06:12
    Target Date displayed on UI : 2015-05-13 09:14

2.  Start Date : 2015-02-09 14:42:44
     Method Returns (in minutes) : 132191
     Target Date displayed on Debug Log: 2015-05-12 09:53:54
     Target Date displayed on UI : 2015-05-14 07:57

 
Gaurav KheterpalGaurav Kheterpal
Interesting, I've never had such issues. Do you mind posting your code? Are you using any locale/ timezone specific information on your page layouts which would cause this conversion/ deviation?

If my answer helps resolve your query, please mark it as the 'Best Answer' to benefit others and improve the overall quality of Discussion Forums.

Gaurav Kheterpal
Certified Force.com Developer| Developer Forums Moderator| Dreamforce Speaker


 
Bakul Patel 24Bakul Patel 24
Hi,
Did you ever find out what was the issue? I am facing exact same issue.

Thanks,
Bakul
Samarjeet Kahlon 56Samarjeet Kahlon 56
Hi Guys,

Has anyone cracked it yet ?

I have exactly the same issue. In my implementation for 3 SLA's of 1 day, 5 day ,10 days, I use 3 different Entitlement Processes (reason out of context for this sdiscussion).
Case Close Milestone used on these 3 entitlement processes use "Minutes To Complete Milesone" values of 1440 minutes (for 1 Day SLA) , 7,200 minutes  (for 5 day SLA) & 14400 minutes (for 10 Day SLA)   ...... each SLA calculated as: [day*24*60]  to get minutes
I have also used cutom business hours on both "Entitlement Process Business Hours" & "Milestone Business Hours" double checked !

Having added both Standard Milestone component and the Case Milstone related list on Lightening page as seen below:
On the Case Milstone related list: For both 10 Day SLA & 5 Day SLA Target Date in INCORRECT
but on the Standard Milestone Component :  For both 10 Day SLA & 5 Day SLA Remaining Time in CORRECT
User-added image

Not sure what needs being configured differently or is it a platform issues? I was thinking "Minutes To Complete Milesone" field on case milestone may have an issue viz... larger values dont work

Having looked online and SF documentation, no luck!

Any help would be much appriciated.

Kind Regards
Samarjeet
Vincent BrenetVincent Brenet
Running in the same problem but solved eventually!
I cleaned up all my Entitlement process old versions.
I made the current version active and by default.
So I have only one active and by default entitlement process.
Then it is working.