You need to sign in to do that
Don't have an account?
IvanB@LM
Chatter context post to the comments
Hi, Experts - I need to know what field is used to store file name when a file is attached to a chatter comment. As in for posts - title field in object feeditem stores file attached to a post; thank you.
Thanks very much. After upgrading my Eclipce I see the newer field.
All Answers
Attachment is stored in the ContentDocument and ContentVersion
check this:
ContentDocument a = [Select Id, Title, CreatedDate From ContentDocument Where Title = 'your file title in the comment'];
System.debug(' ----' + a);
In this case,
first, find the contentId from the FeedComment,
and then find the Title from ContentVersion
FeedComment fc = [Select Id, RelatedRecordId From FeedComment Where CommentType = 'ContentComment' limit 1 ];
System.debug( fc );
ContentVersion cv = [Select Id, Title From ContentVersion Where Id =: fc.RelatedRecordId ];
System.debug( cv );
Thank you for post; however I do not see relatedrecordid field in object feedcomment Here are fields that I see: Select f.ParentId, f.IsDeleted, f.InsertedById, f.Id, f.FeedItemId, f.CreatedDate, f.CreatedById, f.CommentBody From FeedComment f
Runing select you posted I get:
Compile error at line 1 column 18
No such column 'RelatedRecordId' on entity 'FeedComment'. 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.
Thanks for your help again.
Document is here:
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_feedcomment.htm
Please check your API version, must be in Ver. 24
Attachment of Comment is a few feature from Spring'12.
Please upgrade your Eclipse IDE to Spring'12
See:
http://wiki.developerforce.com/page/Force.com_IDE_Release_Notes
Thanks very much. After upgrading my Eclipce I see the newer field.