Salesforce Fact #450 | LastViewedDate in Salesforce

Do you know there is a field named LastViewedDate in each SObject in Salesforce. This field is updated whenever we use the clause FOR VIEW in the SOQL.

For example, the below query fetches one account record and updates the LastViewedDate field of the record with the current date time.

SELECT Id, Name FROM Account LIMIT 1 FOR VIEW;

It also adds or updates a record in an object called RecentlyViewed.

Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow