function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Abilash Kosigi 8Abilash Kosigi 8 

Retrieving Field Level Securities of a profile in a query

Is it possible to query the field level securities associated with a profile?

Please let me know
Profile settings is a Metadata. So you cannot query it. However you can get this metadata programmatically.

Evan KennedyEvan Kennedy
You don't need to query the profile if you're just checking to see if the current user has field-level permission.

Take this example:

This tells you true if the current user has the ability to create accounts.

For field-level:

This tells you whether the "My_Field__c" field on the Account is createable for the current user.

Hope that helps.

Abilash Kosigi 8Abilash Kosigi 8
Thanks for your replies.
My requirement is to fetch the field level security data of all the profiles in the org. Please let me know your suggestions.