0

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    ORDER BY LastViewedDate DESC  LIMIT 7 ];

query returns value for other object in portal but not for account

  • Maybe the user has not viewed any Accounts recently or if the query is running on the portal user's context then Account OWD might play a role here. Can you please check the OWD for Account? – SFDC Prime Squad Feb 13 at 7:28
  • While analysing this issue more, I found that recentlyviewd list is not updating while view the account record, I tried by removing limit and printing the record in debug log – shilpa Feb 13 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.