+ Start a Discussion
smitrasmitra 

Fields retrieve from searchLayout.

Hi All,

I want to retrieve fields from Standard or Custom Object Page Layout.Is there any standard Apex methods which will do that
Ankit AroraAnkit Arora
You can use decribeLayout

DescribeLayoutResult = connection.describeLayout(string sObjectType, string layoutName, ID recordTypeID[]);

I mean you can describe the layouts as well, please see more here how you can play with it :

https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describelayout.htm
https://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_describelayout_describelayoutresult.htm
smitrasmitra
there are few fields which are currently present in Searchlayout .I need a method where I will pass the object name as parameter and retrieve Searchlayout field names.