3

My organization has begun to use casefeed for cases and so far we've run into one problem: emails in the case feed sent by technicians to customers appear in the case feed, but do not get exposed to "AllUsers" in the FeedItem.Visibility property and thus do not get exposed in the portal.

We actually solved another problem with Feed Item Case Notes by using a trigger to analyze the feeditem, check if it corresponded to the case, then setting the its case status to investigating. However, oddly enough, the code that we tried to adapt to do both that case status update and the visibility trick does not even fire on casefeed email items...even though they appear in the case feed as a casefeeditem and export as feeditems from the data loader.

For the sake of completeness, here is a code sample from the trigger:

trigger FeedItemUpdateCase on FeedItem (before insert) 
{
    try
    {
        Set<Id> caseIds = new Set<Id>();
        List<Case> cases2Update = new List<Case>(); //cases we'll update.
        List<Case> casesToConsider = new List<Case>(); //cases we'll filter out

        for (FeedItem fi : trigger.new)
        {
            system.debug('FeedItems parent Id is: '+fi.ParentId);
            string strId = fi.ParentId;
            //If the item is a case.
            if (strId.startsWith('500'))
            {
                //add the case to our ones to update
                caseIds.add(strId);
            }
        }
1

I have experienced a similar issue with AttachArticleEvent and ChangeStatusPost items. It would be nice if we could create a trigger on CaseFeed or if CaseFeed could be merged better into FeedItem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.