Skip to main content
7 votes
Accepted

Query FeedComments for specific parent Type

Sometimes fields declared as Reference do not really work as references. In such cases you need to use some ugly workarounds like this one: SELECT Id, FeedItemId, ParentId, RelatedRecordId FROM ...
Patlatus's user avatar
  • 17.8k
7 votes
Accepted

Query Chatter Feed, Topics, and Groups

Trusty old ChildRelationship to the rescue: for (ChildRelationship relation : SObjectType.Topic.getChildRelationships()) system.debug(relation); Relevant relationships and properties: [...
Adrian Larson's user avatar
  • 151k
3 votes
Accepted

How can I mark 'Best Answer' through ConnectApi?

You need to use ConnectApi.QuestionAndAnswers.updateQuestionAndAnswers after this. https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/...
Sushil Bhardwaj's user avatar
3 votes
Accepted

Object that is used for Case Feed comments

CaseComment is the classic "Case Comment" object, not related to feed items at all. You're looking for FeedComment, which contains comments on feed items.
sfdcfox's user avatar
  • 502k
2 votes

Query FeedComments for specific parent Type

In addition to the answer already presented, you can't use LIKE operator on an id field, as mentioned in the docs The LIKE operator is supported for string fields only. Id is not a string ...
Mahmood's user avatar
  • 6,006
1 vote

Remove comment from Chatter post

By default, all users who are assigned a profile with the feed post editing permissions enabled can edit their posts and comments. If needed, you can disable feed post editing for all users in your ...
Vinay's user avatar
  • 3,599
1 vote
Accepted

Add Validation Error

The addError() documentation states (emphasis mine): Marks a trigger record with a custom error message and prevents any DML operation from occurring. The Trigger Exceptions one states (emphasis ...
RubenDG's user avatar
  • 9,582
1 vote
Accepted

Workaround of Misleading error "The configuration of your org has changed, please reload the page. Missing dependent object: SObject: Settings__Feed"?

Today I have received a feedback that they have opened a Known Issue https://trailblazer.salesforce.com/issues_view?id=a1p4V000002Zl10QAC The workaround is the erase the unpackaged custom settings ...
Patlatus's user avatar
  • 17.8k
1 vote

Getting FeedComment Post's Data

To query FeedComment from the database you'll first need to query one FeedItem and in its SOQL query also request the related FeedItems like so: FeedItem record = [ SELECT Id, ...
Jan Werkhoven's user avatar
1 vote

In Salesforce Classic, Contentversion Triggers not firing on files uploaded through chatter comments?

I have created two triggers on one ContentVersion and other on ContentDocumentLink and tried to upload the files using chatter comment. i found both the trigger is firing if you are uploading a new ...
sanket kumar's user avatar
  • 15.6k
1 vote
Accepted

If user in list, update case field on chatter

A_Elric, From a design standpoint, I would probably add a checkbox custom field to the User object, which is used to indicate whether that user's feed comments should automatically update the Cases' ...
Aubry's user avatar
  • 309
1 vote

Issue in FeedComment Trigger

Files are uploaded before being attached to the Comment. You would have to prevent all file uploads. Otherwise a user could upload a file, then copy a link and insert it into the comment body. Why ...
Paul B.'s user avatar
  • 421
1 vote

Email to record Followers on every post or comment to the record

This is now possible in Summer '17 release via Chatter Streams. Users must first create or subscribe to a stream that includes the records and then have option to set notification to receive email on ...
Doug Ayers's user avatar
  • 4,216

Only top scored, non community-wiki answers of a minimum length are eligible