Monday, July 16, 2018

How To Check Page Layout Assignment Using SOQL Query

This post explains how to check page layout assignment using SOQL.

1. We can see the Page Layout is assigned to any profile or not.

2. We can see the RecordTypeId also, means we can See the Record Type assignment also.

Note:  Use Tooling API to Query, Please Select Tooling API while Querying.

If you are using Developer Console to query
Demo:
SELECT Layout.Name, Layout.TableEnumOrId, ProfileId, Profile.Name, RecordTypeId FROM ProfileLayout WHERE Layout.Name='<Layout Name>' AND Layout.TableEnumOrId = '<object Name OR object ID>'
Check below screenshot for more information about result.

Happy Learning!! 

3 comments:

  1. Hey mate, whats the name of query builder you are using?

    ReplyDelete
    Replies
    1. Hi Rajesh

      I am Using "ORGanizer for Salesforce" chrome Extension
      Link:https://chrome.google.com/webstore/detail/organizer-for-salesforce/lojdmgdchjcfnmkmodggbaafecagllnh?hl=en

      Delete
  2. hello, is there a way to call the default page or determine which layout is the default using query?

    ReplyDelete