Sample Code:
set<Id> CCIds = new set<Id>();
for ( CaseComment c: trigger.new ) {
CCIds.add(c.Id);
}
List < CaseComment > lCComment = [ SELECT Id, Parent.Id FROM CaseComment
WHERE Id IN: CCIds];
set<Id> CaseIds= new set<Id>();
for ( CaseComment c: lCComment) {
CaseIds.add(c.Parent.Id); // collect case Id in set of Id
}
}
No comments:
Post a Comment