Created
October 16, 2019 16:27
-
-
Save nickforce/a05f2ddfe79df989a5071b19642e5722 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Map<Date, List<Task>> tasksbyweek = new Map<Date, List<Task>>(); | |
for(Task t : tasks) { | |
Date weekstart = new Date(); | |
if(tasksbyweek.get(weekstart)==null) | |
tasksbyweek.put(weekstart, new List<Task>()); | |
tasksbyweek.get(weekstart).add(t); | |
} | |
Map<Id, LIST<Case>> caseMap = new Map<Id, LIST<Case>>(); | |
for(Case cc : childCases) { | |
if(caseMap.containsKey(cc.parentId)) { | |
caseMap.get(cc.parentId).add(cc); | |
} | |
else { | |
caseMap.put(cc.parentId, new List<Case>{cc}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment