• Jan Kucera 4
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Query : select id , name from recentlyviewed where type = 'Account'

I just have a custom account page built.The given query is working fine in dev console and on UI but not in the test class.
When I try to load the recently viewed records from the recently viewed object in a test class then it gives the following error message.

Error Message:  sObject type 'recentlyviewed' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

I am not sure why i am not able to access this object using in a test class ??
Any help is appreciated!