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 ...
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:
[...
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/...
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.
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 ...
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 ...
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 ...
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 ...
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,
...
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 ...
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' ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
feedcomment × 34feeditem × 16
chatter × 14
apex × 12
trigger × 9
chatter-feed × 4
visualforce × 3
soql × 3
rest-api × 2
query × 2
mobilesdk × 2
ios × 2
chatter-feed-tracking × 2
salesforcesdk × 2
community × 1
reporting × 1
case × 1
validation × 1
data-loader × 1
attachment × 1
relationships × 1
dynamic-soql × 1
failing-tests × 1
servicecloud × 1
code × 1