• Lisa Haigy 41
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies
I have a trigger on cases that if an external email is received from a certain email, it adds a comment on the case feed.  Is there a way to add a highlight to these comments so it stands out to the user?  Below is my trigger

trigger CaseTrigger on Case (after insert) {
    

   List<caseComment> caseCommentList = new List<caseComment>();
    for (Case t: Trigger.new)
    {
        caseComment cc = new caseComment();
        if(t.ContactEmail == 'abcemail@thisemail.com'){
                cc.parentid = t.ID;
                cc.commentbody = 'For all interactions with Crystal, please ensure that Stephen is also cced on the email';
                cc.ispublished = true;
                casecommentlist.add(cc);
                }
                if(t.ContactEmail.Contains ('@abccompany.gov')){
                cc.parentid = t.ID;
                cc.commentbody = 'For all interactions with abc company, please ensure that all Team Members are copied';
                cc.ispublished = true;
                casecommentlist.add(cc);
                }
                if(t.ContactEmail.Contains ('@abc.edu')){
                cc.parentid = t.ID;
                cc.commentbody = 'For all publishes, please notify abc in advance';
                cc.ispublished = true;
                casecommentlist.add(cc);
                }

        }


            insert caseCommentList;
   
}
We have certain contacts/accounts that submit cases to us and when a new case is created by one of these contacts, I need to have a trigger add a comment to the case relating to special handling?