3

Querying (SOQL) CaseFeed returns incomplete information for some types (for example TrackedChange and EmailMessageEvent).

Both of these StackExchange searches return zero results:

  • casefeed soql EmailMessageEvent
  • casefeed soql TrackedChange

Most of the information on this topic (casefeed soql) seems dated and/or does not work. Other information is pointless like using a Feeds sub-query in a Case query. It returns the same results as a CaseFeed query.

I've seen examples of sub-queries using FeedTrackedChange, but they fail. The API Describe for FeedTrackedChange says it's not queryable.

The Chatter/Connect API is completely useless for a system app because of its licensing model.

Has anyone made progress getting the details/content associated with TrackedChange and EmailMessageEvent?

Added information

It's possible that some of my failed queries were due to the query tool (Workbench) rather than the SOQL itself. I started to make progress when I moved over to VS Code's SOQL Builder.

With respect to the FeedTrackedChanges item... I was going to post a more complete example, but the following query is working well in VS Code: (not in Workbench)

SELECT
    Body,
    CommentCount,
    CreatedBy.Name,
    CreatedDate,
    LinkUrl,
    Id,
    IsRichText,
    ParentId,
    Title,
    Type,
    Visibility,
    (select FieldName,OldValue,NewValue from FeedTrackedChanges)
FROM CaseFeed
WHERE ParentId = 'case Id here'

Note: This query just spins the progress wheel in Workbench.

I made no progress on EmailMessageEvent, but I know how to query the EmailMessage object. So my current strategy is to ignore CaseFeed.Type=EmailMessageEvent, and merge the EmailMessage objects into my collection of feed items. I don't like to reinvent things that already exist though. I'm a little concerned that I might be repeating work already done by Salesforce.

Best regards, Ron

0

You must log in to answer this question.

Browse other questions tagged .