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
A KennedyA Kennedy 

IsArchived field isn't available on the CollaborationGroup object. Why is this?

I have a list of all Chatter Groups in my org, I want to stop any archived chatter groups from displaying in this list.

So I want to check for the IsArchived field and if true, don't display it.

I'm trying the following query:

    List<CollaborationGroup> collaborationGroups = [select Id, Name, IsArchived from CollaborationGroup where Id in :collaborationGroupIds ORDER BY NAME ASC LIMIT 200]; 

But I'm getting the following error:

    No such column IsArchived on entity CollaborationGroup

If I remove `IsArchived` from the query, it runs fine.

According to the SF docs (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_collaborationgroup.htm), there definitely is an IsArchived field on the CollaborationGroup object.

Can anyone tell me what's going wrong here?

Daniel BallingerDaniel Ballinger
As per StackOverflow IsArchived field isn't available on the CollaborationGroup object. Why is this? (http://stackoverflow.com/a/27501346/54026)

According to the Winter '14 release notes (http://releasenotes.docs.salesforce.com/en-us/winter14/release-notes/rn_186_api_chatter.htm) CollaborationGroup.IsArchived was added in API v29.0.

Changed Objects
These objects are changed in API version 29.0.
  • In the CollaborationGroup object:
    • The IsArchived, IsAutoArchiveDisabled, and GroupEmail (pilot) fields have been added.
Check the API version you have on the Apex Class or Trigger.
Ashish_NarangAshish_Narang
In setup->chatter settings -> there is one check box (Allow Group Archiving), which needs to be checked. Once this is done, you will get this in soql as well.