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

Adding contacts to an event

Two questions related to each other -


1. On the standard event  edit page how can I add a custom button or custom link ? I know this can be done using visual force, I need to know how to do this on the standard edit page.


2. Under the Contacts/Attendee Info, when you try to add contacts to the event, it opens up a new page . My requirement is to show only the contacts tied to the Account  on the Available Selected List ( to avoid picking wrong contacts). How do I go about doing this ?


The solution I came up for question 2 is this - Create a new custom button and place it on the detail page. When clicked, it opens up a visual force page which displays the contacts tied to the account. It then mimicks the default Salesforce behaviour of adding /removing the contacts, adding /deleting the EventRelation objects.


   If question 2 is not do-able then is the solution I came up with good ?


Thanks and hope to hear from the architects as well.

Platy ITPlaty IT

I don't think there is any way to add a filter to the Attendee lookup the way you could on other reference fields, so I think you're right that visualforce is the way to go for that. Unfortunately, there is no way to add a button or link to a standard edit page, only the detail, view page.  The only solution I can see is actually overriding the New Event / Edit buttons for Events to use a Visualforce page instead.  Or train users that they have to save the Event before seeing a new Add Attendees button to open the page you already created.