Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions fflib/src/classes/fflib_QueryFactory.cls
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
private QueryField getFieldToken(String fieldName){
QueryField result;
if(!fieldName.contains('.')){ //single field
Schema.SObjectField token = fflib_SObjectDescribe.getDescribe(table).getField(fieldName);
Schema.SObjectField token = fflib_SObjectDescribe.getDescribe(table).getField(fieldName.toLowerCase());
if(token == null)
throw new InvalidFieldException(fieldName,this.table);
if (enforceFLS)
Expand All @@ -102,7 +102,7 @@ public class fflib_QueryFactory { //No explicit sharing declaration - inherit fr
Iterator<String> i = fieldName.split('\\.').iterator();
while(i.hasNext()){
String field = i.next();
Schema.SObjectField token = fflib_SObjectDescribe.getDescribe(lastSObjectType).getField(field);
Schema.SObjectField token = fflib_SObjectDescribe.getDescribe(lastSObjectType).getField(field.toLowerCase());
if (token != null && enforceFLS)
fflib_SecurityUtils.checkFieldIsReadable(lastSObjectType, token);
if(token != null && i.hasNext() && token.getDescribe().getSOAPType() == Schema.SOAPType.ID){
Expand Down