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
Sam D.Sam D. 

CollaborationGroup query run by Site Guest User empty even without sharing

I have a controller that queries the CollaborationGroup table to pull Groups (the groups are part of a Community and therefore have a NetworkID).  However when the controller is run by a Site Guest User the query comes up empty, even though the controller is set to "without sharing".  Any idea why this would be, or how to fix/workaround?

Thanks.

Jim Minichiello 2Jim Minichiello 2
I see that it's almost 6 years later and no one has responded with insight. We are having a very similar issue. A Site Guest User is running a query to find a CollaborationGroup ID based on the Collaboration Group's name. When we execute anonymously, the query returns the proper result. But when we run the trigger that calls the Class with the query, the query (which is being run by the Site Guest User) returns no rows. We can't figure out why.