Can someone please help me here?I have the piece of code here alongwith the error I am facing.
Apex class:Code snippet:
Map<Id,Attachment> mapCaseAttachments = new Map<Id,attachment>();
for (List<Call2_vod__c> c : listOfLists) {
attachment atf = mapCaseAttachments.get(c.Account_vod__C);
attachmentCaseWrapper cw = new attachmentCaseWrapper(c,atf);
caseWrapper.add(cw);
}
Error:
Compile Error: Initial term of field expression must be a concrete
SObject: LIST
Best Answer
You're cycling through a list of lists, not a list of SObjects.
The error message is pretty clear actually:
c.Account_vod__C
c
c
is not an SObject, it is a LISTIf you want to get at the SObject: