I want to access the field value checked/unchecked for all profiles through SOQL.
2 Answers
To access permissions you need to use PermissionSet sobject and ProfileId field on it.
To read more about it, check documentation
Example of soql for your question:
select Profile.Name, PermissionsViewAllData FROM PermissionSet where IsOwnedByProfile = true
-
Thankyou @alexander, due to the field being categorized in administrative permissions, i got confused Commented Jun 7, 2017 at 9:30
You can use below query:
Select Name, PermissionsViewAllUsers, PermissionsViewAllData From Profile