When I try to save the code (API version 58.0), I keep getting a compile error stating:
Error: Compile Error: Variable is not visible: MSTimeCalculator_CC.priorityMap at line 5:13
Below the apex class:
global class MSTimeCalculator_CC
implements Support.MilestoneTriggerTimeCalculator {
global static Map<String,Integer> priorityMap {
get {
priorityMap = new Map<String,Integer>();
priorityMap.put('Urgent',240);
priorityMap.put('High',480);
priorityMap.put('Standard',960);
return priorityMap;
}
}
global Integer calculateMilestoneTriggerTime(String caseId, String milestoneTypeId){
Case c = [SELECT Priority FROM Case WHERE Id=:caseId];
return priorityMap.get(c.Priority);
}
}
Any workaround for this?