Skip to main content
Lavanya Kavuri ha fatto una domanda in #Apex
Hi, 

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 

 
1 risposta
  1. 20 apr 2017, 05:28
    Hi All, 

    This is due to the API Version of the class. I changed it to 39 and everything worked perfectly. 

    Thanks

    Lavanya
0/9000