You need to sign in to do that
Don't have an account?
IKZ
field updated by class only when record is edited, how to change to dynamic live update?
we update Business_Hours_SLA_Start_Initial_Now__c with number of business hours (between CreatedDate & now) and it works fine, but I would like to change that to live update rather than number of hours between created and last modified as it's doing now
if (newCase.CreatedDate != null && newCase.BusinessHoursId != null) { Double timeSinceLastStatus = BusinessHours.diff(newCase.BusinessHoursId, newCase.CreatedDate, Datetime.now())/3600000.0; newCase.Business_Hours_SLA_Start_Initial_Now__c = timeSinceLastStatus; System.debug(newCase.Business_Hours_SLA_Start_Initial_Now__c); }thank you in advance