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
Swapnil PrajapatiSwapnil Prajapati 

Prevent Milestone Recalculation on Case Update

I have an Apex class for calculation milestone's trigger time. In that class, I am calculating a target date and using BusinessHours.diff to calculate trigger minutes and return that.
I also want to save that date on the related case so before returning trigger time from that class I update the case's field with the calculated target date. But doing this is causing a recalculation of milestone times, which calls the milestone trigger time class again and that is giving some weird results.
So is there a way to prevent milestone recalculation?