function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
E GE G 

Identify Case Team Members who actually created the Case

Hi,

I'd like to identify all MemberIds of users that actually created cases. I'm trying to use SOQL to achieve this but I'm missing something in the query.

Select ctm.Id, ctm.MemberId, ctm.ParentId, ctm.TeamRoleId from CaseTeamMember ctm WHERE ParentId IN (SELECT cId FROM Case c WHERE RecordTypeId = '012800000002y3wAAA' AND CreatedDate > 2017-07-10T18:33:32.000+0000) AND MemberId = <CaseOwnerId>

Thanks,
Eno
Praneel PidikitiPraneel Pidikiti
Hello,

What is the error you are getting ?

the only thing that seems strange in the query is instead of c.Id its cId
E GE G
Hi @Praneel,

Sorry, that's a typo. The actual soql os c.Id. The question here is more around the syntax of how to compare the MemberId with the Case.CreatedBy field.