You need to sign in to do that
Don't have an account?

using @mention in trigger
Hi,
I have a trigger which is firing on feed item which will capture the opp id and account id on posting a chatter posr on opportunity
the trigger is working fine and the update is correctly happening
my issue is when i type @user and post something , the user gets gradeout in black where the email is not fired to respective users
whereas in other object it is highlighted in blue correclty
let me know whats the issue and how to handle it in my trigger
Kindly help me on this regard
Thanks in Advance
I have a trigger which is firing on feed item which will capture the opp id and account id on posting a chatter posr on opportunity
the trigger is working fine and the update is correctly happening
my issue is when i type @user and post something , the user gets gradeout in black where the email is not fired to respective users
whereas in other object it is highlighted in blue correclty
let me know whats the issue and how to handle it in my trigger
MY TRIGGER : trigger FeedItemTrigger on FeedItem (before insert,before update) { set<id> parentAccountIds = new set<id>(); for(FeedItem fdItem : trigger.new){ String idStr = fdItem.Parentid; if(idStr.startsWith('006')){ parentAccountIds.add(idStr); } } Map<id,Opportunity> oppty = new Map<id,Opportunity>([Select id, AccountId from Opportunity where id in:parentAccountIds]); if(oppty.size()>0){ for(FeedItem fdItem : trigger.new){ Opportunity parentopportunity = oppty.get(fdItem.Parentid); String chatterBody = fdItem.Body; fdItem.Body = chatterBody + '\n Account Id is :'+ parentopportunity.AccountId + ' \n Opportunity Id :'+parentopportunity.Id; } } }
Kindly help me on this regard
Thanks in Advance
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_ConnectAPI_ChatterFeeds_static_methods.htm#apex_ConnectAPI_ChatterFeeds_static_methods
Thanks,