I'm trying to find the most simple way to cast a
map<Object, List<Sobject>> in any other type like, String, Integer and etc..
Anyone knows how to do this?
This is my code
Map<Object, SolicitationItem__c> mapHierarchyRequestToItem = (Map<Id,SolicitationItem__c>) Collection.of(newRecordsMap.values()).group().byField(SolicitationItem__c.HierarchySolicitation__c).get();
Incompatible types since an instance of Map<Object,List> is never an instance of Map<Id,List<SolicitationItem__c>> (11:72)