[SalesForce] Event with Multiple Leads and Contacts on it

I'm looking for a way to represent something like a seminar where they are many attendees that are clients. Some of these clients will be represented by Contact records and some Lead records.

I'd like to use Event and EventRelation but there are some odd restrictions that I don't see a work around for–

In Lightning, EventRelation records are shown on Event (in the Name related list) only when isParent is true and either one Lead and no Contacts or any number of Contacts but no Leads can have that field set. With a mixed group, that means the Name related list on Event can really only be used to show Contacts.

Now looking on related listed the Events on Contacts. That works in both Classic and Lightning I can get the Open Activities related list and Activity Related history and the Events show up.

But for Lead, I can't get the Events listed (as I have to set isParent to false and they only show in the Activities related lists if isParent is true).

So considering the following use cases–

  1. For a seminar with both Leads and Contact attending — List all Leads and Contacts.
  2. For a Contact — list all the seminars they attend.
  3. For a Lead — list all the seminars they attend.

Case 1 works in Classic but not Lightning.
Case 2 works in Classic and Lightning.
Case 3 does not work in Classic or Lightning.

Anyone have suggestions for the best way to data model?

The one thing I've thought of is use native Event but add a custom related object. Then put that related list on all three objects.

Best Answer

I believe there already exists a data model in Standard SF for it, Its called as Campaign Management.

Here You can say your Event is a Campaign.

All attendees for your events are campaign members. Campaign member is a junction object between A campaign and a lead or a contact or even person account.

Your use case:

For a seminar with both Leads and Contact attending -- Query all campaign Member

For a Contact -- list all the seminars they attend. On Contact, you see campaign related list, which shows all events they attended

For a Lead -- list all the seminars they attend. On Lead you see campaign related list, which shows all events they attended

https://trailhead.salesforce.com/content/learn/modules/campaign_basics/campaigns_basics_unit_3

Src: https://trailhead.salesforce.com/en/content/learn/modules/campaign_basics

Related Topic