Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
HI,
You can Use the below query:
List<RecentlyViewed> accList = [SELECT Id, Name FROM RecentlyViewed WHERE LastViewedDate !=null ORDER BY LastViewedDate DESC ];
And please go through the below Link:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_recentlyviewed.htm
You can also retrieve records that were either viewed or referenced, but only for a limited set of objects.
If this post helps you please give Kudos.
A possible alternative is to query by the LastModifiedDate field to query for the recently modified records.
HI,
You can Use the below query:
List<RecentlyViewed> accList = [SELECT Id, Name FROM RecentlyViewed WHERE LastViewedDate !=null ORDER BY LastViewedDate DESC ];
And please go through the below Link:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_recentlyviewed.htm
You can also retrieve records that were either viewed or referenced, but only for a limited set of objects.
If this post helps you please give Kudos.