Skip to main content
I am trying to read CollaborationGroup records in post installation script. My class implements InstallHandler and is without sharing, Still no records are returned by following query even though record does exist in same org.

List<CollaborationGroup> myList = [select id from CollaborationGroup];

No exception is being thorwn, only records are not visible. Any Help
2 answers
  1. May 7, 2015, 6:05 AM
    Hi Santosh,

    In post install script, code is being executed by Ghost User which is not visible in org.

    Also package is being installed by System Admin who already has required permissions, not sure if we can really check permissions of ghost user.

    Question was not about visibility of informaiton inside group, question is visibility of existence of group itself. 

    Even public groups are not returned by following query in post installtion scrript.

    List<CollaborationGroup> myList = [select id from CollaborationGroup];

    Thanks and Regards,

    Ashish
0/9000