I'm trying to make a chatter post that includes the Opportunity name as a URL. So basically it will be something like: TestOpportunity which would take the user to the actual Opportunity when they click on it. Right now I have it posting as text. Is this possible in a simple chatter post? Thanks in advance for the help!
Update: I managed to get the URL using:
String URL = URL.getSalesforceBaseUrl().toExternalForm() + '/' + opp.Id;
How can I put the Opportunity Name as the URL instead of the ugly URL? Possible?
FeedItem post = new FeedItem();
post.ParentId = oppOwnerId.Id;
post.createdById= oppOwnerId.Id;
post.Body = 'Opportunity ' + opp.Id;
insert post;