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
dJadhavdJadhav 

SOQL / SOSL to retrieve the CampaignMember

Hi, 

 

How to retrieve the CampaignMember using the type(lead/contact) and operator like (equals, start with, contains) 

 

Thanks in advance.

 

Regards,

Dipak

AmulAmul

Use below query:--->

 

Select c.Lead.FirstName, c.Lead.LastName, c.LeadId, c.Contact.FirstName, c.Contact.LastName, c.ContactId From CampaignMember c WHERE c.Lead.LastName LIKE '%SEARCHSTRING%' or c.Contact.FirstName LIKE '%SEARCHSTRING%'

dJadhavdJadhav

Hi Amul,

 

Thanks for reply.

 

I want to use "Type" in the query. On Manage Member page we search the existing campaign member using the type in combination with different operators. I want to implement same feature.

 

Regards, Dipak