Questions tagged [recentlyviewed]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
137 views

RecentlyViewed causes non-selective query error when run from a screen flow

I have a screen flow that calls an invocable apex method containing the query: List<RecentlyViewed> viewedRecords = [SELECT Id , Name , Type , LastViewedDate FROM RecentlyViewed WHERE ...
user avatar
  • 13
0 votes
1 answer
116 views

Hide 'New' Button on Recently View from Opportunity Page

Is it possible to hide the New (Standard Record creation button) from the Recently view of the Opportunity page? Else is there any way we can customize the New button (Only Recently view not Other ...
user avatar
  • 31
1 vote
0 answers
309 views

Can't fetch recently viewed list view information for custom objects

I am trying to fetch existing list views for a custom object, I can find 'Recently viewed' list filter in custom object home page or in its standard tab. But when I query it by SOQL SELECT id, Name, ...
user avatar
0 votes
0 answers
77 views

Assign RecentlyViewed SOQL query to List

I'm trying to query the recentlyviewed records for a user in a login flow. When I run the following query I receive this error: "Compile Error: Illegal assignment from List<RecentlyViewed> to ...
user avatar
0 votes
0 answers
32 views

RecentlyViewed not working for Account for portal user

recentlviewed not working for Account for portal user listRecent = [SELECT Id, Name,Type FROM RecentlyViewed WHERE type IN('Contact','Account','Opportunity','Lead') and LastViewedDate !=null ...
user avatar
  • 95
1 vote
1 answer
266 views

ERROR on Recently Viewed: INVALID_TYPE: record type xxxxxx doesn't belong to xxObjectxxx

Recently switched over to Lightning from Classic. Got this error in testing but never able to replicate it. Assumed it was an issue during development but now a user is getting it in Production when ...
user avatar
  • 43
1 vote
1 answer
29 views

Is it possible to get recordType from RecentlyViewed SOQL?

Is this possible? SELECT Name FROM RecentlyViewed WHERE Type = 'foo' and Type.RecordType.Name = 'bar' If yes, how should I go about it?
user avatar
0 votes
1 answer
1k views

Recently Viewed list filter for custom objects

Why salesforce does not show Recently Viewed List filter for Custom objects in Salesforce classic? Is there anyway we can create list filter for Recently View records. I cannot find LastViewedDate ...
user avatar
5 votes
1 answer
214 views

RecentlyViewed data leakage in unit tests

I have some code that queries RecentlyViewed and needed to be unit tested. I noticed a failure today because more records are turning up than expected. It turns out that if you query RecentlyViewed ...
user avatar
  • 10.6k
2 votes
1 answer
473 views

Is it possible to schedule a class to run as the system, instead of the current user?

Context: I have a class that is scheduled to run in an hourly basis, and it unfortunately updates a few dozens of records when it is run. As a result, I get these records on my "recent viewed" list, ...
user avatar
1 vote
1 answer
299 views

Entitlement lookup popup window not showing recently viewed anymore

Previously, when looking up an Entitlement from a Case, the recently viewed Entitlements would show up. Now, even users who have view all accounts and entitlements are not having this functionality. ...
user avatar
  • 979
2 votes
0 answers
59 views

Recording When A Record Was Viewed / Visited?

I'm not finding any luck online. Does anyone know of a way to effectively (considering we're talking about Salesforce within a controlled Corporate environment) track when a record is VISITED and by ...
user avatar
  • 4,584
2 votes
1 answer
984 views

Testing RecentlyViewed object records

I've got an Apex class with simple method returning recently viewed records using 'RecentlyViewed' object type. The issue is with inserting test data for unit tests because LastViewedDate field is not ...
user avatar
  • 171
2 votes
1 answer
2k views

Show all the records instead of recently viewed records

On Clicking Look up field,it will show recently viewed records.But is it possible to show all the records which are satisfying the filter criteria,instead of showing recently viewed records.
user avatar
  • 421
3 votes
2 answers
160 views

View override and Recent Items list

I noticed when I load a record for an object that has its View overridden with a Visualforce page, it does not put this record into the "Recently Viewed" list. Is there any way to put this record ...
user avatar
  • 1,669
3 votes
1 answer
950 views

Query RecentlyViewed return different result from Recent Item

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 ...
user avatar
  • 2,472