Find your content:

Search form

You are here

Apex Generated Chatter - hyperlink in the text of the chat to go to a custom object

 
Share

I have read some other items on this list that are somewhat the same question as I am about to pose but not exactly - I apologize if this is a duplicate.

I was experimenting with Chatter in our development org and just using Chatter settings (in Setup - Customize - Chatter) I was able to set it so that when you change a lookup field setting on my custom object you get a chatter feed that indicates what the old and new lookup values were related to the change.

An example of the chatter is shown below:

enter image description here

The words 'Samples' and 'Service Loaners' are links to custom objects so if you click on them you go directly to that record in the standard salesforce fashion.

I have a process (APEX) that writes some chatter that is posted to either an Account, Contact, Opportunity or User object but that mentions my custom object in the text of the chatter (e.g. "Assigned Equipment (MyEquipmentName) on (DateOfAssignment)").

Can anyone tell me how I could write a chatter feed item that contains hyperlinks to a my custom object so that someone could click (MyEquipmentName) and be taken to the custom object?


Attribution to: AngiB

Possible Suggestion/Solution #1

I believe you're lookin for a way to post chatter mentions. You can't currently post chatter mentions without making use of the chatter rest Api

Here's the solution to a similar question that was asked - this should let you post mentions How can I add an @mention when creating a FeedItem via APEX?


Attribution to: techtrekker
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/3449

My Block Status

My Block Content