5

can we get recently viewed records? like standard page recent Items.

thanks in advance

1 Answer 1

7

Yes you can use RecentlyViewed object.

RecentlyViewed

Represents records that the current user has recently viewed or referenced (by viewing a related record).

You just need to query this object and specify the type of object

Example

SELECT Id, Name FROM RecentlyViewed  WHERE Type ='Account'

You can also use ORDER BY LastViewedDate field to get latest records

SELECT Id, Name FROM RecentlyViewed  WHERE Type ='Account' ORDER BY LastViewedDate DESC 
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .