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
Ines CortesInes Cortes 

Query when a list view was last viewed by ANY user

After haivng used salesforce for several years and too many users having access to create public list views, it is time to clean them up. I am trying to run a query to find out when a list view was last viewed. I know there is a lastvieweddate field, however, when you run the query, it shows when you, the user running the query, have last used that view. It could have been used by another user 5 minutes ago though but if I am running the query, that is not reflected.

So how could I go about finding out when a public list view was last viewed by ANY user in the org? The end goal is to delete any public views that have not been used for more than let's say 4 months by any user.

Opened a SFDC support case and was told that this is not standard functionality and to post on the forum here to see if anyone has any ideas and/ or to post it as an idea.

Any help would be much appreciated.
Hargobind_SinghHargobind_Singh
I would second with salesforce support. Since we can't have custom VF components as a part of list-view, it would be hard to track when user has clicked the view. 
@lfredo@lfredo
SELECT Id, LastViewedDate, Name, SystemModstamp FROM ListView WHERE SObjectType = 'Case'