Salesforce edit recently viewed list view

I have been asked to customize the generic "Recently Viewed [object]" list views that are present for Salesforce objects (note: I do not mean the [object] Tab Search Layout.) The only problem is that this list view does not have an Edit option and just cloning it is not sufficient.

Salesforce edit recently viewed list view

There does not appear to be any option to configure this under the Customize menu, either. Without resorting to custom JavaScript in the side panel, is there a way hide columns? Is it possible to update this via the Metadata API?

Edit

I used Ant to retrieve the Account object and every list view is present except the built-in Recently Viewed Accounts list view.

1

For most list views, your users can select which fields to display and how to order the view columns. However, they can’t edit the recent records quick list on object home pages. Only Salesforce admins can select and order the fields to display for the recent records quick list. Admins can’t make any other changes to this default list.

  1. From Setup, at the top of the page, select Object Manager.
  2. Click the label name of the object for the Recently Viewed list you want to modify.
  3. From the menu of links at the top of the page, click Search Layouts.
  4. In the far right of the Search Results row, click 
    Salesforce edit recently viewed list view
     and select Edit.Recently viewed lists use the Search Results search layout in Lightning. In Classic, recently viewed lists use the Tab search layout.
  5. To add columns to the Recently Viewed list, select one or more fields from Available Fields and click Add. To remove columns, select one or more fields from Selected Fields and click Remove.
  6. Order columns by selecting one or more fields from Selected Fields and clicking Up or Down.
  7. Click Save.


  1. From Setup, at the top of the page, select Object Manager.
  2. Click the label name of the object for the Recently Viewed list you want to modify.
  3. From the menu of links at the top of the page, click Search Layouts.
  4. In the far right of the Search Results column, clickand select Edit.
  5. To add columns to the Recently Viewed list, select one or more fields from Available Fields and click Add. To remove columns, select one or more fields from Selected Fields and click Remove.
  6. Order columns by selecting one or more fields from Selected Fields and clickingUp or Down.
  7. Click Save.


Salesforce edit recently viewed list view

When you click a tab in Salesforce, you will see default columns / fields from records recently viewed. For most list views, your users can select which fields to display and how to order the view columns. However, they can’t edit the recent records quick list on object home pages. Only Salesforce admins can select and order the fields to display for the recent records view.

In Classic, to modify fields displayed in the Recently Viewed List on Object home pages, navigate to Setup | Customize | object name | Search Layouts, click the object name Tab, you can select fields would like to show in the Recently Viewed List. You can order columns by selecting one or more fields from Selected Fields and clicking Up or Down.

If you are familiar with the step in Classic, this is different in Lightning Experience. If you follow above steps, the Recently Viewed List on Object home pages will not change. So, follow this steps:
  1. From Setup, enter Object Manager in the Quick Find box, then select Object Manager.
  2. Click the label name of the object for the Recently Viewed list you want to modify.
  3. From the menu of links at the top of the page, click Search Layouts.
  4. In the far right of the Search Results column, click arrow icon and select Edit.
  5. To add columns to the Recently Viewed list, select one or more fields from Available Fields and click Add. To remove columns, select one or more fields from Selected Fields and click Remove.
  6. Order columns by selecting one or more fields from Selected Fields and clicking Up or Down.
  7. Click Save.

Reference: Select Fields to Display in the Recently Viewed List on Object Home Pages in Lightning Experience

When Salesforce introduced Lightning, it replaced Classic’s list of recently viewed items appearing directly on the Tab with a List View which is pre-loaded whenever the Tab is clicked.  While helpful to quickly access recently viewed or edited records, the default columns in the Recently Viewed List View are not always useful or relevant.  In the screen shot below you can see the Account Site and Account Owner Alias fields, which we might want to replace. Upon first glance, it is not obvious how to edit the columns. Some admins assume it is possible at all.

Salesforce edit recently viewed list view

Unable to Edit Using List View Controls

You could, for instance, try to Edit the Recently Viewed List View using the gear off the to the right. This is how we can create, edit or delete other List Views in Salesforce Lightning. Oddly, there is no option to edit the out-of-the-box Recently Viewed List Views from the front end of Salesforce Lightning. We can modify the other out-of-the-box List Views, such as My Accounts, by renaming them, modifying filters, changing columns, etc.

Go to Object Manager Under Setup

Salesforce edit recently viewed list view
We are able to edit the Recently Viewed List View, as a System Administrator, by going under Setup, and using the Object Manager to find the Object in question.  The Gear which leads to Setup in Lightning offers quick access to the current Object’s Object Manager Page through the Edit Object link.

In this case we want to change the columns that appear on the Account Object’s Recently Viewed List View.  To do so, we go to the Account Object in Object Manager. We’ll click on Search Layouts, then use the down arrow to select Edit to the right of  Search Results.

Salesforce edit recently viewed list view

Editing Search Layouts

Editing Search Layouts is simple- you just need to identify which fields you want displayed and click Save. Use the arrows to Add or Remove columns. There are a few unrelated controls which hark back to Salesforce Classic- specifically the ability to allow Users to Override Search Results and add Custom Buttons. Neither applies to Lightning.

Once we return to the Account Tab and reload the page we see the columns we specified to be shown. Note that your browser will often cache structural changes to Lightning, thus the reload.

Salesforce edit recently viewed list view