HI M Coder, We cannot get layout associated with sObject through SOQL.There is also an idea for the same- https://trailblazer.salesforce.com/ideaView?id=08730000000KmowAAC Please consider upvoting this idea so that salesforce product development team can implement it in coming releases based on number of upvotes.
As per, https://salesforce.stackexchange.com/questions/103209/soql-quey-to-get-page-layouts-names-for-perticular-object you might want to try the approach of using workbench.
Go to Info -> Metadata Types & Components and Select Layout from dropdown. You can see all layouts there per object Related: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describelayout_describelayoutresult.htm
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
Thanks for your query , so let us say i have a recordtype named Consumer in opportunity object , how do you want me to write a quey reg opportunity object.
My main aim is to see, which pagelayouts in Opportunity fall under Consumer recordtype.
We cannot get layout associated with sObject through SOQL.There is also an idea for the same- https://trailblazer.salesforce.com/ideaView?id=08730000000KmowAAC
Please consider upvoting this idea so that salesforce product development team can implement it in coming releases based on number of upvotes.
As per, https://salesforce.stackexchange.com/questions/103209/soql-quey-to-get-page-layouts-names-for-perticular-object you might want to try the approach of using workbench.
Go to Info -> Metadata Types & Components and Select Layout from dropdown. You can see all layouts there per object
Related: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_describelayout_describelayoutresult.htm
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you
You can use the tooling API and get the layout name respected to Recordtypes. Eg.
Select LayoutName from ProfileLayout where RecordType.Name = 'Recordtype Name';
Hope this help you and you can retreive data as per your need.
Thanks for your query , so let us say i have a recordtype named Consumer in opportunity object , how do you want me to write a quey reg opportunity object.
My main aim is to see, which pagelayouts in Opportunity fall under Consumer recordtype.
Thanks in Adv
@MCoder,
This should help:
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you