Skip to content

Use the FAVORITES and RECENT options to return documents and object records from the currently authenticated user’s Favorites and Recent lists in the Vault UI.

  • FAVORITES: Filter records or documents to those the currently authenticated user has marked as a favorite.

  • RECENT: Filter records or documents to the 20 the currently authenticated user has viewed most recently (in descending order by date).

  • Documents: Available in v22.2+.

  • Object Records: Available in v23.2+.

You cannot use the FAVORITES and RECENT options in subqueries or with other query target options such as ALLVERSIONS.

SELECT {fields} FROM FAVORITES|RECENT {query target}

The following are examples of queries using FAVORITES and RECENT.

Query: Retrieve Favorite Documents

Section link for Query: Retrieve Favorite Documents

The following query returns the ID and name of all documents in the currently authenticated user’s Favorites list:

SELECT id, name__v FROM FAVORITES documents

The following query returns the ID and name of all documents in the currently authenticated user’s Recent Documents list:

SELECT id, name__v FROM RECENT documents

Query: Retrieve Favorite Object Records

Section link for Query: Retrieve Favorite Object Records

The following query returns the ID and name of all Product records in the currently authenticated user’s Favorites list:

SELECT id, name__v FROM FAVORITES product__v

Query: Retrieve Recent Object Records

Section link for Query: Retrieve Recent Object Records

The following query returns the ID and name of all Product records in the currently authenticated user’s Recent Products list:

SELECT id, name__v FROM RECENT product__v