Use the RecentlyViewed table
Did you know you can query recently viewed records?
By running this simple query, you can get records that user recently viewed:
By running this simple query, you can get records that user recently viewed:
sql
SELECT Id, Name
FROM RecentlyViewed
WHERE Type IN ('Account', 'Contact', 'User')
ORDER BY LastViewedDate DESCWhy it is useful?
Using this simple query, you can build custom Recently Viewed lists:

Or use it as a search proposition in input components:



