The examples in this section use REST API Query and Recently Viewed resources to programmatically retrieve and update recently viewed record information.
To mark a record as recently viewed using REST API, use the Query resource with a FOR VIEW or FOR REFERENCE clause. Use SOQL to mark records as recently viewed to ensure that information such as the date and time the record was viewed is correctly set.