fflib-apex-common
fflib-apex-common copied to clipboard
QueryFactory does not like User.SmallBannerPhotoUrl nor User.MediumBannerPhotoUrl
If I construct a UserSelector class and include User.SmallBannerPhotoUrl and User.MediumBannerPhotoUrl as fields in the getSObjectFieldList() method, I get the following error whenever I run any UserSelector methods
System.SObjectException: Field User.SmallBannerPhotoUrl is inaccessible in this context Class.fflib_QueryFactory.getFieldTokenPath: line 131, column 1 Class.fflib_QueryFactory.selectFields: line 269, column 1 Class.fflib_SObjectSelector.configureQueryFactory: line 363, column 1 Class.fflib_SObjectSelector.newQueryFactory: line 273, column 1 Class.fflib_SObjectSelector.newQueryFactory: line 255, column 1 Class.fflib_SObjectSelector.buildQuerySObjectById: line 337, column 1 Class.fflib_SObjectSelector.selectSObjectsById: line 204, column 1 Class.UsersSelector.selectById: line 25, column 1
Any thoughts as to why this is occurring?
@capeterson, @frup42, and @afawcett - Any thoughts on this one?
I have a workaround in place so it is not urgent.
So these fields got added in Winter'17, API 38. However fflib is still at API 37. Doing some googling seems to connect API version mismatch and dynamic apex usage being the cause.
this is related to https://github.com/financialforcedev/fflib-apex-common/issues/215