Is Field Level Security enforcement a requirement for querying tables like 'FiscalYearSettings' and 'Period'? or only for tables like Opportunity and Contact.

Our app need to display the fiscal year and period information. So I was wondering if we really need to enforce FLS for these tables.

Map<String, SObjectField> fields = Period.SObjectType.getDescribe().fields.getMap(); 
boolean isAccessible= fields.get('Number').getDescribe().isAccessible();

So do we need to check if number is accessible before displaying this information? Is this information always gonna be accessible for all the users?

  • You cannot set any CRUD/FLS on setup objects as is the case with FiscalYearSettings. When you say it's not accessible in Apex, what is the error you are getting? I would think you could always do a SOQL on FiscalYearSettings obejct. – Jayant Das Feb 19 '19 at 16:46
  • I changed the question a bit, because I realized that it was actually returning true. But the main question is still open, do we really have to double check if the user can access it? – jvrdelafuente Feb 19 '19 at 17:18
  • 1
    I couldn't find any documentation around it, but that seems to be the case here. I would really then skip the double check in such scenarios. – Jayant Das Feb 19 '19 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.