This could be a general Developer Console issue as well, but as of now it pertains to the ContentNote object.
I am trying to run a query in an apex class that will looks at related Content Notes on Opportunities. The problem I am running into, is that myself and other users cannot see the ContentNotes. In the developer console query I can only see ContentNotes created by myself (Select id From ContentNote). However if I explicitly put a WHERE clause with an Id, I can see that record in the dev console (Select id From ContentNote WHERE id = 'xxxxxxxxxxx').
When I queried for the SharingPrivacy of the ContentNote I get "N" for all of them - the ones I can only see when I specify an ID. I also have a trigger that is setting the Visibility field of ContentDocumentLink to 'AllUsers' so that record shouldn't be the problem.
Is there anything else that could be blocking me from querying the ContentNote records?
I can also see all AttachedContentNotes
(SELECT Id, Name, (SELECT Id FROM AttachedContentNotes)FROM Opportunity) without having to specify an ID, but that isn't the solution to my problemThe parent object -
Opportunityhas sharing settings set toPrivate, however as the system admin, I can query all opportunities.- The
ContentNoteshave the message'Visibility Set by Record'