You need to sign in to do that
Don't have an account?
Greg Coogan
Querying ContentNote Doesn't Return Notes By Other Users
I am querying against the ContentNote object using the Developer Console. I am using the administrator account to query, which has the Modify All Data permission. However, I return no results from that table even though my users have many Notes. How can I query the IDs of everyone's notes? Are they hidden from me? The query did return a few records before I deleted my Notes, so I know the query is correct.
Query:
SELECT Id FROM ContentNote
Query:
SELECT Id FROM ContentNote
If Library is shared ,then it also be a member of library with permission defined in the url mentioned in last reply above.
Thanks,
All Answers
Did you check that the current user has salesforce crm Content User Permission?
Thanks,
Hi Greg,
Could you also look at ,that the user is member of that content library?
you can verify the permission which is mentioned in the below url.I have also faced this problem and mine was resolved by following url.May be it can resolve yours.
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentdocument.htm
Thanks,
In your first reply, when you said "current user," did you mean the system admin user I was currently logged in as or the user's Notes I was trying to delete?
Is that URL supposed to show how to check if my admin account is a member of that content library, which is likely the private library owned by that user whose files I am trying to delete.
If Library is shared ,then it also be a member of library with permission defined in the url mentioned in last reply above.
Thanks,
@Greg Coogan,
I am also having same use case Is there a way in salesforce using soql where we can get documents owned by other users but not necessarily shared to me?
I want to collect all the documents owned by each User in Salesforce account.
I have created accessToken with User A's email, where User A is a System Admin with property PermissionsModifyAllData and PermissionsViewAllData is true.
For User A we get all docs for which he is owner of but for all other users we get docs in which User A is a shared permisison by directly shared or with Domain shared i.e. when trying to query docs for let say User B we are not able to get docs in which User B is owner but it is not shared with User A.
I am using below SOQL with accessToken created with User A's login.
https://testdomain.salesforce.com/services/data/v48.0/queryAll?q=select Id, Title, Description, ContentSize, isDeleted, OwnerId, ParentId, LastModifiedDate, LastModifiedById, CreatedDate, FileType, FileExtension, PublishStatus from ContentDocument where OwnerId = '005XXXX000XXXX00XX'
Any lead to solve this usecase will be much appreciated.