+ Start a Discussion
Richie DRichie D 

Error in package: sObject type 'CollaborationGroup' is not supported

Hi,

 

I have a problem with the following line in a beta package:-

 

List<CollaborationGroup> groups = [select id, name, description from collaborationGroup where name=:name];

giving the error:

 

System.QueryException: sObject type 'CollaborationGroup' is not supported

 

This works in the development org and other orgs where installed so am at a loss to explain, and therefore fix, this issue. If collaborationGroup wasn't available then I'd have thought the package wouldn't have installed??

 

Thanks for any help on this one.

 

Regards,

Rich.

bob_buzzardbob_buzzard

Is chatter enabled in the org that you are installing into?  I must admit I'm not sure what would happen if you tried to install a package that relied on it.  I seem to recall I had some code that used the schema describe to check if the sobject is available, but for the life of me I can't find it.

Richie DRichie D

Hi Bob,

Thanks for the reply. If Chatter isn't active then an error on package install is seen so Chatter must be active at 'install time'. If Chatter is then dissabled I'll have to see what happens..

 

I'm going to delve into the permissions to see if CollaborationGroup is available in the org where the error occured. If I find anything useful I'll post for future reference.

 

Cheers,

Rich.

 

 

Tarun TelangTarun Telang
Can I write a code in such a way that there is no deploytime dependency and during run time it detects whether Chatter is enabled in the org if yes provide this funcitonality dealing with Groups and Group Members otherwise not.
This would be required because some of our customers would be using chatter while some would be not.