• #28153
     Rajan #18
    Forcetalks

    How to query recently viewed records of a particular Salesforce sobject?

    How to query recently viewed records of a particular sobjects ?

     

    #28154
    Salesforce | Aman Aman #4
    Forcetalks

    Hi Rajan,

    You can use the below query :

    [SELECT Id,Name FROM RecentlyViewed WHERE Type = ‘et4ae5__IndividualEmailResult__c’ ];

    Thanks

    #28166
    Salesforce | PRANAV PRANAV #14
    Forcetalks

    Hi Rajan

    You can use the below SOQL query:

    SELECT Id, Name, Type, LastViewedDate
    FROM RecentlyViewed
    WHERE LastViewedDate !=null AND Type = ‘Account’
    ORDER BY LastViewedDate DESC

    Here you can use different TYPE for particular sObject.

    Hope this helps you more.

    #35831
    Salesforce | shariq shariq #1
    Forcetalks

    Hi,

    Try this –

    SELECT Id, 
    FROM RecentlyViewed
    WHERE  Type = ‘sobject__c’
    ORDER BY LastViewedDate DESC Limit 50000

    Hope this helps.

Viewing 4 posts - 1 through 4 (of 4 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?