Official comment
Hi Kelly,
My apologies for the late response.
Try the following request:
POST /data/entityQuery
{
"typeName": "DiscussionMessage",
"fields": [ "Text","Container","Post", "CreatedBy", "CreatedOn" ],
"orders": [ { "fieldName": "CreatedOn", "order": "Descending" } ],
"where" : {
"leftExpression": { "fieldName": "Container" },
"operator": "In",
"rightExpression": {
"query": {
"_type": "entityQuery",
"typeName": "EnhancementRequest"
}
}
}
}
Brief explanation:
- The DiscussionMessage is the base class for DiscussionPost and DiscussionReply classes.
- The Container field is the reference to the entity. It may be Case, WorkItem, Project, EnhancementRequest or something else.
- The Post field is the reference to the initial DiscussionPost. You need this for replies.
- I filtered all DiscussionMessages using the inner query in the "where" clause.
Let me know if it helps.
Regards.
Comment actions