I am trying to create a custom VF page using a Custom Controller for Community to display Groups.

My SOQL Query is

[SELECT CollaborationGroupId,CollaborationRole,CreatedById,CreatedDate,Id,LastFeedAccessDate,LastModifiedById,LastModifiedDate,MemberId,NotificationFrequency,SystemModstamp,NetworkId From CollaborationGroupMember Where NetworkId =: Network.getNetworkId() ];

This query works perfectly in Developer Console Query / Anonymous Block. However, I get the below Error when I try to save my Controller class.

No such column 'NetworkId' on entity 'CollaborationGroupMember'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

I have a System Admin Profile and I am not sure what I am missing here.

Thank You

Regards, Lavanya

  • 4
    What is the API version of the Controller class? Try updating it to v39.0 Apr 20, 2017 at 4:34

1 Answer 1


As per the comments, the issue will likely be with the API version of the Apex Class. Especially since the same query works in the Developer Console in Anonymous Apex.

As such, try updating the API version of the Apex class to v39.0 to match what the Developer Console if currently using.

  • Thanks Daniel.. It was the API version that caused an issue. Aug 3, 2017 at 6:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .