Newer Version Available
RecentlyViewed
This object is available in the Tooling API version 33.0 and later.
Supported SOAP Calls
query(), update()
Supported REST HTTP Methods
GET
Special Usage Rules
- Apex classes
- Apex triggers
- Approval processes
- Apps
- Custom report types
- Email templates
- Fields
- Objects
- Page layouts
- Permission sets
- Profiles
- Static resources
- Tabs
- Users
- Validation rules
- Visualforce pages
- Visualforce components
- Workflow email alerts
- Workflow field updates
- Workflow outbound messages
- Workflow rules
- Workflow tasks
Fields
| Field | Details |
|---|---|
| Alias |
|
|
|
| FirstName |
|
| Id |
|
| IsActive |
|
| LastName |
|
| LastReferencedDate |
|
| LastViewedDate |
|
| Name |
|
| NetworkId |
|
| Phone |
|
| ProfileId |
|
| RelatedObject |
|
| Title |
|
| Type |
|
| UserRoleId |
|
Usage
This object provides a heterogeneous list of different metadata types and consists of recently viewed records. A record is considered viewed when the user sees the details associated with it, but not when the user sees it 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, 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 per object.
Use this query in your code to retrieve a list of all the records that were recently viewed. The results are ordered from most to least recent.
1SELECT Id, Name
2FROM RecentlyViewed
3WHERE LastViewedDate !=null
4ORDER BY LastViewedDate DESCUse this query to retrieve data that was either viewed or referenced, but only for a limited set of objects.
1SELECT Id, Name
2FROM RecentlyViewed
3WHERE Type IN ('CustomEntityDefinition', 'CustomFieldDefinition')
4ORDER BY LastViewedDate DESC