Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
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
  • 150k
6 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
  • 17k
3 votes

Createddate not showing as editable in UI

Some of the System fields are not editable. So in other words you can not modify createddate of record. This done by design and there are few exceptions for while performing data migration Salesforce ...
AtulRajguru9's user avatar
  • 9,120
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
  • 493k
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
  • 5,944
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,498
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
  • 8,572
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
  • 17k
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.4k
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
  • 401
1 vote

Update feeditem createddate once it has been inserted

CreatedDate being a System Audit field, we cannot edit this field. You can set this field while performing Data Import. Enable Create Audit Fields
Devendra's user avatar
  • 5,075
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,196

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