We are using salesforce cases and Case owners have been using Chatter to ask questions about the case. The problem is that chatter messages sent from cases only show the case number in the email. There are no other relevant details about the case record, so the recipient has no idea what the message is referring to.
So in order to provide more context to the post, I am trying to add the Case's Subject to the Post, but I am not able to achieve that.
Is there a way to use to automatically populate the case subject line in the page layout’s “Chatter Post” box. Any chatter posts would then automatically include the case subject line as a text string? Or Can this be achieved through trigger?
I tried querying Parent.Subject to get the Case's Subject to check about using the trigger as a possibility but it's not working and it's throwing an error. May be because the Chatter post is associated with multiple objects and the Subject field is relevant only to the Case object. Below is the query I tried.
SELECT Id,InsertedById,IsClosed,IsDeleted,LinkUrl,ParentId,Parent.Name, Parent.Subject, RelatedRecordId,Title,Type,Visibility FROM FeedItem WHERE Parent.Type = 'Case'
Can someone please let me know if this problem can be solved in any way? If yes, how? Thanks in advance.