Newer Version Available
RecentlyViewed
Supported Calls
describeSObjects(), query(), update()
Special Usage Rules
The RecentlyViewed object doesn’t support the Event, Task, Report, KnowledgeArticle, and Article objects.
The RecentlyViewed object supports only certain objects, and supports list views only for those supported objects. Supported objects have the fields LastReferencedDate and LastViewedDate.
Fields
Usage
This object provides a heterogeneous list of different object types. The list consists of recently viewed records, records that were recently referenced (a related record was viewed), or recently viewed list views. A record is considered viewed when the user sees the record details, but not when the user sees the record in a list with other records. Use this object to programmatically construct a list of recently viewed items specific to the current user. For example, use this object on a custom user interface or for search auto-complete options. You can also retrieve a filtered list of records by object type (Type). The RecentlyViewed data is periodically truncated down to 200 records and 200 list views. RecentlyViewed data is retained for 90 days, after which it’s removed on a periodic basis.
Use this query in your code to retrieve a list of all the records and list views that were recently viewed. The results are ordered from most to least recent.
Use this query to retrieve data that was either viewed or referenced, but only for a limited set of objects.
This query retrieves a list of all recently viewed contacts with contact-specific fields, such as the contact’s account name, and the custom website field. Records are ordered from most to least recent.