You need to sign in to do that
Don't have an account?
Rajan Patil
How to get app specfic profile list?
My business user don't know what are all profile or users belogs to his application and for his department having different layouts for Page Layout.
Now they are asking us to add some fields on page layout which having access for them.
My requirment is i want to know the list of page layout belongs the custom app as well the list of profiles assigned to it.
Can anyone have some code snipest or SOQL for the same?
Now they are asking us to add some fields on page layout which having access for them.
My requirment is i want to know the list of page layout belongs the custom app as well the list of profiles assigned to it.
Can anyone have some code snipest or SOQL for the same?
//1. get user applications
List<UserAppMenuItem> userApps = [select appmenuitemid, applicationid, label, name, type from UserAppMenuItem where type='tabset'];
//2.loop through all applications to get appdefinination
for (UserAppMenuItem app : userApps)
{
AppDefinition appdefiniation = [SELECT Description, DeveloperName, DurableId, Label FROM AppDefinition where id=:app.applicationid];
//3. get all tabs in the application
List<AppTabMember> tabs = [SELECT AppDefinitionId, SortOrder, TabDefinitionId, TabDefinition.Name, TabDefinition.Label FROM AppTabMember WHERE AppDefinition.DurableId = :appdefiniation.DurableId];
}
You can navigate to the specific app from Quick find--->App and check.
You can find list of profiles assigned. Also, you can check on individual profiles and see app permissions.
You can check objects assigned under 'Choose Navigation Tab Items' and it has nothing to do with page layout you need to check manually.
SELECT Id,DeveloperName FROM AppDefinition
SELECT Name FROM AppMenuItem
References:
https://salesforce.stackexchange.com/questions/289295/soql-query-for-to-get-the-tabs-of-particular-application
Hope above information was helpful.
Please mark as Best Answer so that it can help others in the future.
Thanks,
Vinay Kumar