I run this query to get RecentItem data,
SELECT Id, Name FROM RecentlyViewed ORDER BY LastViewedDate DESC LIMIT 10
But I m login as same user,open SFDC Home in other tab and my customize Home in other tab. I can see that my customize RecentItem is returning different result with standard Recent Items.The left is standard RecentItem and the right is customize.For customize I am using the above query.
Is there anyway to get exact data like standard Recent Item data?
update:
Summary: The result only achieved by using REST API.Something like below.
-----------------------More clarification----------------------------------------
I tried queries stated in RecentlyViewed but still it won't display same.The real case is,it can be same, it can be different.There 's no guarantee it will be displayed as standard Recent Items all the time.So I created case to SFDC regarding this.Here the reply:
"The recent items list is populated however its not an exact replica of the recent items under the Home tab.This could be due to the below reason :-
This object provides a heterogeneous list of different object types and consists of recently viewed records or records that were recently referenced (a related record was viewed). 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."
Actually this attribute already stated in the documentation.So they suggested me to use REST API, which can be referred to here.I tried it in Workbench,yes it display same as RecentItems.But note that, there is no LastViewedDate provided.