So far I've seen the Campaign Member Record Type is set based on the Campaign Member Type
field which the Campaign has.
What I need is to set the Campaign Member RT based on the Campaign's RT. Is there any way of doing this?
So far I've tried with Workflows and Process Builder, but the field wasn't available, which leaves me only to triggers. The problem is I wanted a fairly standard way. Any ideas?
Best Answer
All the
CampaignMember
records associated to a Campaign record possess the same RecordTypeId. The field used to determine the RecordTypeId isCampaignMemberRecordTypeId
and it is present on Campaign Object. I came across a scenario some time back where I could not use Workflow to update the RecordTyepId on CampaignMember. So, I ended up writing an Apex trigger that updates theCampaignMemberRecordTypeId
field present on Campaign object.