I have to populate a set of Ids with Ids derived from a
List<List<sObject>> say searchlist. Below code as I am trying gives me System.Final Exception as Collection is read only and prevents me to copy over Ids from
Set<Id> tempids to
accids = new Map<Id,SObject>(searchList).keySet(); for(List<sObject> s: searchList) tempids = (new Map<Id,SObject>(s)).keySet(); accIds.addall(tempids);
Can someone please let me know what's wrong going on here?