There is a new method for Schema in Winter 14 called Schema.describeSObjects. The idea as I understand the docs is that you can pass in a list of sObject names as strings, and get back the describe results for each of them in a list of results. But it doesn't seem to working as I would expect, but maybe I am just missing something obvious...
As I understand it, these calls should return the same information. The new method returns the basic info, but when I request the recordtypeinfo, I get back null...
Schema.DescribeSObjectResult r = Account.sObjectType.getDescribe();
system.debug(r); //Returns basic describe info
system.debug(r.getRecordTypeInfosByName()); //Returns all the record types
String[] types = new String[]{'Account'};
List<Schema.DescribeSobjectResult> results = Schema.describeSObjects(types);
system.debug(results); //Returns the same basic describe info
system.debug(results[0].getRecordTypeInfosByName()); //**returns null**
.getRecordTypeInfos()
seems to work fine. You could use that to rebuild the Map if required.getRecordTypeInfosById()
andgetRecordTypeInfosByName()
doesn't work butgetRecordTypeInfos
does. There is nothing seems to be missed in sample code.