• Ashish_Narang
  • NEWBIE
  • 0 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 6
    Replies
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
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
when I tried to install our unmanaged package I recived below error

"Your requested install failed. Please try this again.

None of the data or setup information in your salesforce.com organization should have been affected by this error.

If this error persists, contact salesforce.com Support through your normal channels and reference number: 1254580032-60446 (356011732)"
I have tried the installation several times and continued to get the error.

Any solutions?

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?

My first question, Is it possible to add a remote site dynamically through apex ?

 

Regardless of the answer, I still tried to achieve this by using Metadata API within Salesforce. Below is my code.

 

public static void createremoteSiteSettings()
{
MetadataService.MetadataPort service = createService();
MetadataService.RemoteSiteSetting remoteSiteSettings = new MetadataService.RemoteSiteSetting();
//remoteSiteSettings.fullName = 'Test';
remoteSiteSettings.url = 'http://www.google.com';
MetadataService.AsyncResult[] results = service.create(new List<MetadataService.Metadata> { remoteSiteSettings });
}

public static MetadataService.MetadataPort createService()
{
MetadataService.MetadataPort service = new MetadataService.MetadataPort();
service.SessionHeader = new MetadataService.SessionHeader_element();
service.SessionHeader.sessionId = UserInfo.getSessionId();
return service;

 

I am getting this error : System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Must specify a {http://www.w3.org/2001/XMLSchema-instance}type attribute value for the {http://soap.sforce.com/2006/04/metadata}metadata element faultcode=soapenv:Client faultactor=

 

Any help would be appreciated ! 

 

Hi,

 

I have requirement to fetch comment likes. I'm not able to figure out on how to retrieve commentlikes.

 

FeedLike object represents likes. You can't query FeedLike records directly. They can only be queried via the parent NewsFeedUserProfileFeed, or entity feed, such as AccountFeed.

 

So to query FeedPost likes, use following:

SELECT Id, (SELECT Id, CreatedById, CreatedDate, FeedItemId, FeedEntityId FROM FeedLikes) FROM UserFeed

 

to query group post likes, use following:

SELECT Id, (SELECT Id, CreatedById, CreatedDate, FeedItemId, FeedEntityId FROM FeedLikes) FROM CollaborationGroupFeed

 

How to retrieve comment likes?

 

 

With the new API 20.0 version, seems like we get access to photos using SmallPhotoUrl and FullPhotoUrl, but seems like i need to have my salesforce session while accessing these images.

 

I have 2 requirements:

 

1. Way to download the image (get Image method)

2. Or an external shared image which can be accessed without salesforce session,

 

Is it possible with new API 20?