You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of a question than anything but what is the reasoning behind having getStandardFields()? I'm experiencing fflib_SecurityUtils exceptions due to some of the standard fields not being readable when it comes time to execute the query. It seems to me that it is making the assumption that users will have access to all standard fields for any object they have read access to, but I'm not sure if I'm missing something. At the very least, should it be its own thing separate from includeFieldSetFields since it's not even a field set?
If I do understand the problem correctly, a solution I'd like to propose is -if enforcingFLS- ignore fields that are inaccessible.
Schema.DescribeFieldResult fieldDescribe = field.getDescribe();
if ( ! fieldDescribe.isCustom() )
{
if ( fieldDescribe.isAccessible() || ! isEnforcingFLS() )
{
standardFields.add( field );
system.debug( LoggingLevel.FINEST, 'Standard field : ' + field + ' added');
}
else
{
system.debug( LoggingLevel.FINEST, 'Standard field : ' + field + ' NOT added');
}
}