How do I convert a list to a Map in Salesforce?
You can get the name of the Sobject using the method getSObjectType(); Try the below code where I have used Map to store the SobjectType and the List of all records of that Sobject. Map<Schema. SObjectType, List<SObject>> objMap = new Map<Schema.