You need to sign in to do that
Don't have an account?
Sahil Mahajan 32
How to query Users who have access to a particular Tab ?
My use case is - I want list of all Users who have access to a particular Custom Tab.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
In Apex, you can check only Object/Field permissions and not tab visibility. To do that, we need to use Metadata API.
Check below references.
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_profile.htm#profiletabvisibility_title
https://salesforce.stackexchange.com/questions/49270/how-to-get-custom-tab-visibility-in-controller-based-on-user-profile
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
You could query the PermissionSetTabSetting object to get a list of which Profiles/Permission Sets have the particular tab access you're interested in. Then query the PermIssionSetAssignment object to determine which users are assigned.
https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_permissionsettabsetting.htm
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_permissionsetassignment.htm