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
AM1974AM1974 

creating a list button of Event with a VisualForce page.

Hi,

I am trying to create a custom button of Event having display type "List Button" and Content Source "VisualForce page". If I understand correctly, to achive this I need to have a page with the recordSetVar attribute set to some value, like:

 

 

<apex:page standardController="Event" Extensions="controllerClass" action="{!redirect}" recordSetVar="MyEvents">
	<apex:pageMessages />
</apex:page>

 However, when i try to save such a page i get the following error massage:

"Save error: List controllers are not supported for Event".

 

 

I can of course save the page without recordSetVar, but then I cannot use it as the content source when the display type is "List Button".

 

Therefore, I assume that there is no way to create a list button of Event using a VF page. Is that correct or is there any workarround to this issue?

 

Thanks,

Alon

 

 

EMHDevEMHDev

There is no standard controller for events or tasks.  You need to write a custom controller. 

AM1974AM1974

??

I think you are wrong, i used standardController="Event" in many pages already!

I can use of course a custom controller, but how can i use then this page as the content source of an Event list button? the page will not appear in the dropdown of available pages for content, because it doesnt have Event as its standard controller..

 

EMHDevEMHDev

Sorry, I meant there is no standard list controller for events.  I needed a list controller for tasks and came across the same problem.  You can either manage the list yourself (using a List<Event>) or you can use the standardSetController to help you with the list management, pagination, etc, but you will need to write it as a custom controller.

 

To use the existing list views for your content you may be able to use the enhancedList component.  I've not used it myself yet but I believe that this is what it gives you.  I don't know if you can use it with Events, try it out.