+ Start a Discussion

How to check if ListView is public or private?

I am using ListViews in apex.using AccSetController.getListViewOptions()

 I want to check if the listview is private or public i.e. ('Visible to me' or all) ? 

Any help would be appreciated

ShashankShashank (Salesforce Developers) 
The ListView object via the metadata API has a "SharedTo" field available which may be accessed using Apex metadata API.

Listview: https://www.salesforce.com/us/developer/docs/api_meta/Content/meta_listview.htm
Apex metadata API: https://github.com/financialforcedev/apex-mdapi