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
IbtIbt 

Get custom list views

Hi,

 

        I have created two views(view1, view2) using "Create New View" link provided in contacts list page at salesforce. I have done integration with salesforce (partner and metadata wsdls) to web application through JAX-WS. Iam able to get contacts using partner wsdl. As of I know that the created views are storing in ListViews object. To retrieve these views, I am using metadata api. When I use the following code, Iam not able to get my created views(view1, view2).

 

ListMetadataQuery query = new ListMetadataQuery();
query.setType("CustomObject");
List<ListMetadataQuery> queries = new ArrayList();
queries.add(query);
double asOfVersion = 27.0;
List<FileProperties> lmr = metadataCoonnection.listMetadata(queries, asOfVersion);
if (lmr != null) {
    for (FileProperties n : lmr) {
        System.out.println("Component fullName: " + n.getFullName());
        System.out.println("Component type: " + n.getType());
    }
}

 

 

 

Is my approch wrong or Is any mistake in code?

Thanks in advance for any help.

 

Thanks & Regards

Kumar