fflib-apex-common icon indicating copy to clipboard operation
fflib-apex-common copied to clipboard

QueryFactory does not like User.SmallBannerPhotoUrl nor User.MediumBannerPhotoUrl

Open ImJohnMDaniel opened this issue 7 years ago • 3 comments

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?

ImJohnMDaniel avatar Mar 27 '17 16:03 ImJohnMDaniel

@capeterson, @frup42, and @afawcett - Any thoughts on this one?

I have a workaround in place so it is not urgent.

ImJohnMDaniel avatar Mar 27 '17 16:03 ImJohnMDaniel

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.

afawcett avatar Apr 15 '17 02:04 afawcett

this is related to https://github.com/financialforcedev/fflib-apex-common/issues/215

cropredyHelix avatar Mar 18 '19 23:03 cropredyHelix