Sample Code:
Set < Id > caseCommIds = new Set < Id >();
Decimal TotalTime = 0;
for ( CaseComment cas : trigger.new ) {
caseCommIds.add(cas.Id);
}
List < CaseComment > listCaseComments = [ SELECT Id, Parent.CaseNumber, Parent.Description FROM CaseComment WHERE Id IN: caseCommIds ];
for ( CaseComment cas : listCaseComments ) {
}
Set < Id > caseCommIds = new Set < Id >();
Decimal TotalTime = 0;
for ( CaseComment cas : trigger.new ) {
caseCommIds.add(cas.Id);
}
List < CaseComment > listCaseComments = [ SELECT Id, Parent.CaseNumber, Parent.Description FROM CaseComment WHERE Id IN: caseCommIds ];
for ( CaseComment cas : listCaseComments ) {
}