• PremInfo
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 5
    Replies

Hi, 

 

I want to download the attachments from the FeedComments. I am able to get the ContentData from the ContentVersion Object with reference to RelatedRecordId. Issue is to create the file I also need to know the name of the attachment and type of the attachment like txt, jpg etc. Kindly let me know how can i get the ContentName.

 

query I'm using: SELECT VersionData From ContentVersion WHERE Id = RelatedRecordId.

Hi,

 

Is it possible to upload / download a file from the FeedComment using SOQL. 

 

FeedComment object is not having any fields to hold the attachments.

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_feedcomment.htm

 

Kindly let me know the workaround for the same.

Hi,

 

SELECT Body, CommentCount, Id, InsertedById, IsDeleted, LikeCount, LinkUrl, ParentId, RelatedRecordId, Title, Type, CreatedDate, ContentData, ContentDescription, ContentFileName, ContentSize, ContentType, Parent.Name, CreatedBy.FirstName FROM FeedItem WHERE Type != 'ContentPost' ORDER  BY  CreatedDate  DESC

 

My aim is to get the Parent name and the feed created person name with the feedItem using above query.

 

The Parent name and created by fields are allways returing null. Kindly advice am I doing any mistake or what is the right way to get the parent name from the FeedItem.ParetnId.

 

Thanks,

Hi Team,

 

I am trying to download the attachment from salesforce using SObject. Its working fine for the files less than 2MB size but failing with java out of memory : heap space error message for the file more than 2MB. We have the limit of 25MB in salesforce.

I have pasted the stack trace below. Your suggestion and guidance in this issue is much appreciated.

 

[Error]

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
at java.lang.StringBuilder.append(StringBuilder.java:119)
at com.sforce.ws.bind.XmlObject.loadAfterStartTag(XmlObject.java:284)
at com.sforce.ws.bind.XmlObject.load(XmlObject.java:263)
at com.sforce.ws.bind.XmlObject.loadAfterStartTag(XmlObject.java:281)
at com.sforce.ws.bind.XmlObject.load(XmlObject.java:263)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readArray(TypeMapper.java:528)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:506)
at com.sforce.soap.partner.QueryResult.loadFields(QueryResult.java:1)
at com.sforce.soap.partner.QueryResult.load(QueryResult.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504)
at com.sforce.soap.partner.QueryMoreResponse_element.loadFields(QueryMoreResponse_element.java:1)
at com.sforce.soap.partner.QueryMoreResponse_element.load(QueryMoreResponse_element.java:1)
at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:628)
at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:504)
at com.sforce.ws.transport.SoapConnection.bind(SoapConnection.java:173)
at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:147)
at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:98)
at com.sforce.soap.partner.PartnerConnection.queryMore(PartnerConnection.java:1)
at com.informatica.cloudlabs.adapter.chatter.utils.ChatterHelper.getAllContentFeeds(ChatterHelper.java:271)
at com.informatica.cloudlabs.adapter.chatter.utils.ChatterHelper.fetchFeedItem(ChatterHelper.java:304)
at com.informatica.cloudlabs.adapter.chatter.read.ChatterRead.read(ChatterRead.java:97)
at com.informatica.cloud.api.adapter.reader.runtime.GenericRdrPartitionDriver.run(GenericRdrPartitionDriver.java:294)

 

[/Error]

I am not able to fetch and insert the user status feed into feed item.

 

1. SELECT Type FROM FeedItem WHERE Type='UserStatus' returning 0 records even though user status feed is available

2. When I try to create a User Status feed of type FeedItem getting error "User status feed cannot be created directly through feeditem"

 

Please let me know if I am doing any thing wrong here and the right way to get the user status feeds.

 

 

Hi,

 

I am using Sobject in my application and using API version 24. When I try to download the attachments more than 2 MB files I am getting Java out of memory exception. I tried by changing the heap size 512 - 1024MB even then its throwing same error. I am not facing this issue while downloading files less than 1 MB.

 

Kindly let me know the maximum size of the file I can upload or download using the SObject API.

 

Also let me know is version 24 is the latest version for chatter Sobject API, if it is not provide the latest version no. and the location of the corresponding wsdl file.

 

 

I am trying to filter based on body of the feedItem table but an Invalid field exception is thrown. Kindly let me know how should I filter by body. I am using SObject in my application. I was able to do the filter on body with version 18 but not in 24. I have mentioned below the code and error message which i got.

 

[code]

connection = Connector.newConnection(config);

QueryResult result = connection.query("SELECT Id from FeedItem WHERE Body like '%testing%' ");

[/code]

 

[error]

ERROR at Row:1:Column:31
field 'Body' can not be filtered in query call'

[/error]

I am using the Sobject in my application for fetching feeds from chatter. Similarly I want to post the feed with "@" mentioned and "#" links.

Please help me by providing sample code by using Sobject. 

 

Thanks,

Prem

Hi,

 

Is it possible to upload / download a file from the FeedComment using SOQL. 

 

FeedComment object is not having any fields to hold the attachments.

 

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_feedcomment.htm

 

Kindly let me know the workaround for the same.

Hi,

 

SELECT Body, CommentCount, Id, InsertedById, IsDeleted, LikeCount, LinkUrl, ParentId, RelatedRecordId, Title, Type, CreatedDate, ContentData, ContentDescription, ContentFileName, ContentSize, ContentType, Parent.Name, CreatedBy.FirstName FROM FeedItem WHERE Type != 'ContentPost' ORDER  BY  CreatedDate  DESC

 

My aim is to get the Parent name and the feed created person name with the feedItem using above query.

 

The Parent name and created by fields are allways returing null. Kindly advice am I doing any mistake or what is the right way to get the parent name from the FeedItem.ParetnId.

 

Thanks,

Hi,

 

I am using Sobject in my application and using API version 24. When I try to download the attachments more than 2 MB files I am getting Java out of memory exception. I tried by changing the heap size 512 - 1024MB even then its throwing same error. I am not facing this issue while downloading files less than 1 MB.

 

Kindly let me know the maximum size of the file I can upload or download using the SObject API.

 

Also let me know is version 24 is the latest version for chatter Sobject API, if it is not provide the latest version no. and the location of the corresponding wsdl file.