You need to sign in to do that
Don't have an account?
Staci
business hours on cases using company default instead of milestone business hours
I have my entitlement and entitlement process without business hours. The only place it is declared is the milestone and the Company Profile page. Is something I need to include in my trigger to NOT make it default to the Company Profile?
Trigger
Trigger
trigger CW_DefaultEntitlement on Case (Before Insert, Before Update) { List<Id> acctIds = new List<Id>(); for(Case c: Trigger.new){ if(String.isNotBlank(c.AccountId)){ acctIds.add(c.AccountId); } } List <Entitlement> entls = [Select e.StartDate, e.Id, e.EndDate, e.AccountId From Entitlement e Where e.AccountId in :acctIds And e.EndDate >= Today And e.StartDate <= Today]; if(entls.isEmpty()==false){ for(Case c : Trigger.new){ if(c.EntitlementId == null && c.AccountId != null){ for(Entitlement e:entls){ if(e.AccountId==c.AccountId){ c.EntitlementId = e.Id; } } } } } }
@Staci
Please try this and let me know if this works.