function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sana Tahseen 7Sana Tahseen 7 

Query ContentDocument for share/unshare activity

Querying ContentDocument with 'lastReferencedDate' reflects the recently shared file Ids. Whereas unsharing a file does not update the 'lastReferencedDate' field for some reason. Even 'SystemModStamp' is not updated when a file is unshared. Therefore, I was looking for 'LastActivityDate' field for ContentDocument Standard object. The main purpose to track down Ids of files that are recently shared/unshared using Salesforce Query API. Any help will be helpful. Thanks

Query that returned recently shared file Ids is as follows:
https://<instance_name>/services/data/v32.0/queryAll?q=SELECT+Id+FROM+ContentDocument+WHERE+lastReferencedDate>2015-04-16T17%3A34%3A49%2B00%3A00