When logging in as a user I can see that they have ListView
's that I can't find programatically (I'm a System Administrator). Using the Id of the ListView
in the URL when logging in as that user, I looked for the list view in the following ways
QUERIES:
SELECT CreatedBy.Name,CreatedDate,DeveloperName,Id,LastViewedDate,Name FROM ListView
SELECT CreatedBy.Name,CreatedDate,DeveloperName,Id,LastViewedDate,Name FROM ListView USING SCOPE EVERYTHING
(The ListView
returned records, but only public list views)
SELECT Id FROM UserListView
SLECT Id FROM UserListView USING SCOPE EVERYTHING
(The UserListView
qeuries returned no records)
REST EXPLORER:
/services/data/v45.0/sobjects/ListView/00B1Y000007ErH0
where 00B1Y000007ErH0
is the Id I found while logging in as the user.
(I got a resource not found error)
BULK API:
I exported the entire ListView
table via the bulk API but got the same results as the ListView
queries above. The UserListView
was not available via the bulk API.
I looked through the questions and answers of the following posts and did not find my answer.
- How can I get the selected listview id (or name) without using javascript
- How to read a ListView (restricted Visibility to me) with APEX MetadataService.cls?
- How to retrieve what filters were set on a listview using API?
- Retrieve/Deploy a custom metadata type's list view?
- Parsing ListViews columns from the Metadata API
- Access ListView via REST API
- Deploy/Download Profile ListView
- how to get listview query by passing the listview Id?
Has anyone had any success programatically accessing ListView
's that users have created? I need to do some auditing on what kind of views they are creating.
EDIT:
In the metadata documentation for list views I noticed it says
List views with the Visible only to me Restrict Visibility option are not accessible in Metadata API. Each of these list views is associated with a particular user. I wonder if that applies to more than just the metadata api and is completely inaccessible without logging in as each user.
ListView
record where the person creating it selected "Visible only to me". There is no exception.