Page Views by Salesforce History

Get the currently logged in user 90 days page view history:

SELECT Alias,Email,FirstName,Id,IsActive,Language,LastName,LastReferencedDate,LastViewedDate,Name,NameOrAlias,NetworkId,Phone,ProfileId,RecordTypeId,Title,Type,UserRoleId FROM RecentlyViewed



Get the list of records where the user has read access (Using apex SOQL Query):
SELECT RecordId FROM UserRecordAccess WHERE UserId=:UserInfo.getUserId() AND HasReadAccess = true AND RecordId IN :allRecordIds LIMIT 200

Comments

Popular posts from this blog

Transaction Security Policy In Salesforce

Salesforce Data Cloud

Add/Remove Content in the VF Page using JS