Activity Forums Salesforce® Discussions How can I get 'Recent Items' object Ids in Salesforce Apex (soql) is it possible?

  • Surbhi

    Member
    September 8, 2016 at 1:52 pm

    Hi Tanu,

    Below is the SOQL sample query:

    SELECT Id, Name FROM RecentlyViewed WHERE Type IN ('Account', 'Contact') ORDER BY LastViewedDate DESC

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos