1

We have the following scenario in an application built with React and implementing the REST Api via an integration user. We currently:

  • Retrieve a list of cases based on a custom Master ID field
  • Display these in a list on screen
  • Wish to display all comments, logged calls etc (basically everything you can see in the CaseFeed tab on the Case screen) on screen to the user

I have been playing around in the workbench for a while now, and have as of yet not been able to put together a SOQL query that will satisfy our requirements.

The closest I have come is:

SELECT Body,CommentCount,CreatedById,CreatedDate,Id,InsertedById,IsDeleted,IsRichText,LastModifiedDate,LikeCount,LinkUrl,ParentId,RelatedRecordId,SystemModstamp,Title,Type FROM CaseFeed WHERE ParentId='caseidxyz123' ORDER BY CreatedDate DESC NULLS FIRST

But it does not display the entered text for any new Events or Tasks from within the Salesforce Case screen. Standard Posts display as desired in the response from the query.

To add to this, when posting using the integration user via the REST API, only items created by posting to the FeedItem endpoint display any content in the Body field. Items created by posting to the CaseComment field do not display anything in the Body field. Both methods produce items displayed using the query above.

Any advice much appreciated as to how we can get all of this information displayed would be much appreciated.

After looking at the Chatter API and using a GET feed-element call, iI see that for elements created using the API and "Post" field in the Case screen, we get data as follows:

"body": {
    "isRichText": true,
    "messageSegments": [
      {
        "htmlTag": "p",
        "markupType": "Paragraph",
        "text": "",
        "type": "MarkupBegin"
      },
      {
        "text": "Case post. does this display in CaseFeed?",
        "type": "Text"
      },
      {
        "htmlTag": "p",
        "markupType": "Paragraph",
        "text": "\n",
        "type": "MarkupEnd"
      }
    ],
    "text": "Case post. does this display in CaseFeed?\n"
  }

Whilst for Events and Tasks, it looks like we only get:

     {
      "body": {
       "isRichText": null,
       "messageSegments": [],
       "text": null
     },

The field type for Evens and Tasks is set at long text, whilst the others are set at either Text or Rich text.

Thanks

0

Please review this link. Task and Event Objects

Basically in a Event Object, in that Object there is an Subject and it is a Picklist of calls, text, emails, and Send Letter/ Quote. It is related to WhoId which is the ID of a Contact or a Lead. There is a WhatId which is the Object and Screen that the Event will be related as an Active in Salesforce these are the ID's for Account, Opportunities and Other Custom Objects.

| improve this answer | |

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.