Using the below code, I get this error message:
An unexpected error occurred. Please include this ErrorId if you contact support: 76743200-1017657 (1358022652)
String sql = 'SELECT Id, DeveloperName FROM RecordType WHERE SObjectType =Case';
Map<Id,RecordType> caseMap = new Map<Id, RecordType>([sql]);
I am from Java background I know below works fine, but why not above ?
Map<Id,RecordType> caseMap = new Map<Id, RecordType>([SELECT Id, DeveloperName FROM RecordType WHERE SObjectType = 'Case']);