function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
wowo 

List View Definitions

Is there a way to get the defined List Views for a given object type via the Partner API?  I would like to take advantage of any defined lists so that I can retreive the same lists via the API.  I would be happy if I could retreive the name and the actual query.  The list of sObjects for a given a view would even be nicer...
 
Thanks,
Greg
JonPJonP
The set of list views available for an object are set in the Page Layout.  Different Page Layouts for the same object may have different related lists.

Take a look at the DescribeLayout method in the Web Services API.  The DescribeLayoutResult includes a set of related lists for each layout returned.

See:

http://www.salesforce.com/us/developer/docs/api/index.htm

Reference > Describe Calls > describeLayout > DescribeLayoutResult > RelatedList
Ron HessRon Hess
List views are not available from the API, this is different from Related lists, related lists are visible as jon mentions.

List views are those views that appear in the pulldown on the object tab home.
jeremy_wjeremy_w

Hi

 

Does anyone know if this is still the case? Or are list views for standard objects available somehow via the parter API?

 

Thanks

 

JonPJonP

The Spring '09 release of the Force.com platform added support for List Views (distinct from related lists, as Ron correctly points out above) to the Metadata API.  They are located in the .object file for a particular object.  This allows them to be copied from one organization to another using the Force.com IDE, Migration Tool for Ant, or third party Metadata API clients.

 

However, List Views are not available as some kind of "saved query" for API usage (per the thread's original question).  That's not really their purpose so I wouldn't hold my breath for that feature--but you can always build grassroots support for it by posting on IdeaExchange.