Skip to main content
Hi Friends ,

I need a approach to fetch 10 mostly/frequently hit records in an object.has anyone implemented this.if so please revert back.

NOTE: I just need a approach or if anyone has the implemented code then it would be like cherry on top of the cake.

Thanks for reading this post and helping me out.

  
1 answer
  1. Jun 15, 2015, 9:25 AM
    Hi Amol,

    You can use the below example queries,

    Query to Retrieve Recently viewed records, 

    SELECT Id, Name,LastViewedDate FROM Account WHERE LastViewedDate !=null ORDER BY LastViewedDate DESC

    Query to Retrieve Recently Modified records, 

    SELECT Id, Name,LastModifiedDate FROM account ORDER BY LastModifiedDate DESC

0/9000