Merge pull request #27 from wimvelzeboer/RecordType-patch
Fix issue with fflib_RecordType when cache is null
This commit is contained in:
@@ -63,6 +63,7 @@ public class fflib_RecordTypeId
|
||||
String sObjectName,
|
||||
String recordTypeName)
|
||||
{
|
||||
if (cache == null) cache = new Map<String, Map<String, RecordTypeInfo>>();
|
||||
if (cache.containsKey(sObjectName)) return getRecordTypeIdFromCache(cache, sObjectName, recordTypeName);
|
||||
|
||||
Map<String, RecordTypeInfo> recordTypeInfosByName = fflib_SObjectDescribe.getDescribe(sObjectName)
|
||||
@@ -97,4 +98,4 @@ public class fflib_RecordTypeId
|
||||
}
|
||||
|
||||
public class RecordTypeException extends Exception {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user