function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Gary WGary W 

How can I create my own case feed item upon related record creation?

I have a custom object called Escalations related to my Cases. If I create a new escalation via a custom 'create a record' action on my case, it creates a feed item which looks like this:
User-added image

If I create the escalation using a flow, using the create records element, the feed item is not automatically created. 

I have tried manually creating the feed item in the same flow which creates the escalation. I'm creating new record on the feedItem object. The values I'm using are:
  • ParentId = Escalation ID
  • Feed Item Type = CreateRecordEvent
  • Visibility = AllUsers
When I create the feed item record, I cannot see it on the case, which kind of makes sense, since I have not directly referenced the case in the feed item.

Can anyone point me in the right direction on how to create a feed item which shows up on the case feed like in the screenshot above?
Best Answer chosen by Gary W
Gary WGary W
I figured out how to do this, however it appears that it's just plain impossible to do it via manually inserting records.

What I ended up doing was actually using the quick action on the case object in my flow. The action is a 'Create a Record' action type, and 'Create Feed Item' is checked. I was then able to use this action by referencing it in the Action component in the flow to create my related escalation record, instead of using the create records element in the flow. This creates the related record, and created a fleed item linking to it.

I wish it was possible to just create my own feed items directly though, as there's more flexibility in flows, however this workaround works fine.