Clean Salesforce org is a key for successful implementation. You know the pain when you’ve created so many list views.

Recently one of my clients had the same issue; let me show you how I handled it. It is pretty simple to identify how to find and delete such list views.

Before going ahead, if you haven’t read my previous articles, please do so now. It will help you shape your Salesforce skills with the latest release features.

  1. Create Dynamic Forms in Salesforce with Clicks
  2. How to Set Assignment Expiration on Permission Sets and Permission Set Groups

Use Case

Andy is working as a Salesforce Administrator at Appiuss Softwares. His VP of Client Success has to identify the Case list views which he is not Viewed in the last 60 days.

Pre-requisite

Before going ahead, let’s take a minute pause here to understand the ListView object. It represents a list view. A list view specifies a set of records for an object, based on specific criteria.

Solution

  1. Run the following through VP of Client user’s account.
  2. Click on Setup | Developer Console
  3. Navigate to Query Grid and select Query Editor
  4. Run the following query
  5. select id, name , LastReferencedDate, LastViewedDate, SobjectType from listview where LastViewedDate!=LAST_N_DAYS:60 and SobjectType='Case'
  6. You have the list view Ids. Have a meeting with your VP of Client Sucess and decide if you want to delete or keep it.

You are Done!!!

I would love to hear about your experience with Unused List View deletion. How do you work on unused list views?

Join our newsletter.

No spam, just learning!

Continue Reading

Get a free consultation.

Call us today at (469) 790-0063

Schedule a Consultation

5 Comments

  1. Raj Arora March 18, 2022 at 7:19 am - Reply

    Right now for this article. It helped me to solve my problem. Thank you.

  2. Joe Smith March 19, 2022 at 8:37 am - Reply

    Is there a way to find users who have not logged In to Salesforce in the last 60 days

    • Meenakshi Kalra March 19, 2022 at 1:57 pm - Reply

      Use below query
      select id, name, LastReferencedDate, LastViewedDate from User where IsActive = true and LastViewedDate!=LAST_N_DAYS:60

  3. Sankaran March 21, 2022 at 2:56 am - Reply

    I wish this could be this simple. But, unfortunately it’s not.

    Lastviewieddate is a ‘logged in user’ specific field. In your use case, if a admin run this query, he/she will see the listviews whichever viewed by him/her.

    So, you can’t find all the listviews viewed by ALL users. Not possible. Please check, i am curious to know if there’s a solution for this.

  4. Raymond Kramer June 23, 2022 at 2:14 am - Reply

    It’s actually a great and useful piece of info. I’m happy that you just shared this useful info with us. Please stay informed like this. Thank you for sharing

Leave a Reply