Is there a single page where I can view Lightning Home Assignments? I am looking for something like how you can see page layout assignment by profile and record type for an object, but I want it for App and Profile. Does this information exist on one page somewhere? Thanks!
-
1Are you looking for the assignment for the home page/tab or for record pages? There is a lookup calculator for record pages for each object if you go into Object Manager -> Lightning Record Pages where you can get all assignments for a specific app.– KristianCommented Jul 27, 2020 at 4:25
-
yes this is it, it was hard to find, you could make this an answer– jaw999Commented Jul 29, 2020 at 16:50
2 Answers
There is a lookup calculator for record pages for each object if you go into Object Manager
-> Lightning Record Pages
-> View Page Assignments
where you can get all assignments for a specific app.
There is no standard apex query or class for this and there is no UI unless you go to Lightning App builder and look at each Lightning page.
However if you are really interested to know, this is present in the metadata named "Profile Override".
Profile Override is a part of custom Application metadata.
You can build a viewer in apex using tooling api. Here is a starter code to get you started on this.
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint(Url.getOrgDomainUrl().toExternalForm()
+ '/services/data/v48.0/tooling/query/?
q=Select+Id,Metadata+FROM+CustomApplication');
req.setMethod('GET');
req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionId());
HttpResponse res = h.send(req);
System.debug(res.getBody());
The response has profileOverrides for every application that has record type and profile assignments for every lightning app.
-
1