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
ylabarreylabarre 

Custom view lookup in database

Hello,

 

I created a custom view or lookup in the "contacts" page. I want to get the definition of this view dynamically in my C# code. Could you please tell which table in the database are stored those informations ?

 

Thanks by advance.

Best Answer chosen by Admin (Salesforce Developers) 
sfdcfoxsfdcfox

List views are described by MetaData's retrieve() call, under CustomObject.ListView. Please check the documentation for details.

All Answers

sfdcfoxsfdcfox

List views are described by MetaData's retrieve() call, under CustomObject.ListView. Please check the documentation for details.

This was selected as the best answer
ylabarreylabarre

ok, thank you.

 

ListMetadataQuery q = new ListMetadataQuery();
q.type = "ListView";
FileProperties[] lmr = sMetadata.listMetadata(new ListMetadataQuery[] { q }, 0);

 

In "lmr" variable I got all views and in fullName attributes I got "Contact.AllContacts", "Contact.NewLastWeek", "Contact.NewLastWeek" ...

But I'm not able to obtain my custom listview nammed "viewTest" in Contacts.

 

How I can get this listView ?

Thks

ylabarreylabarre

Ok, I put "visible for all" in Sales Forces for this listview and now I'm able to get this. However I can't get the definition of this list view filters . ??

ylabarreylabarre

I finally get the xml definition with the package retrieve metadata.

RajaReddyRajaReddy

Hi all

 I have similar problem like  this i am able to retrieve fullnames of views but i want column as well as filterscope also,

 there is any posibulity to retrieve