Monday, June 2, 2014

How to know Recently Viewed items using Soql Apex Class?

How to  know Recently Viewed items using Soql Apex Class?


In Summer ’13 Release salesforce introduced the new Standard Object called  RecentlyViewed, so using that we can easily get the all the recently viewed items using apex class.
Sample SOQL:
SELECT Id, Name, LastViewedDate FROM RecentlyViewed  WHERE Type IN ('Account', 'Contact', 'Case') ORDER BY LastViewedDate DESC
Note:
The RecentlyViewed object does not support the Report, KnowledgeArticle, and Article objects.





0 comments:

Post a Comment

 
| ,