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
Hera SoherwardyHera Soherwardy 

I want to prevent certain users from deleting events. This is not allowing anyone but an admin to delete


<apex:page action="{!if($User.Alias !='user1' && $User.Alias != 'user2' ,
null,
urlFor($Action.Event.Delete, $CurrentPage.Parameters.id, [retURL='/00T'], true) ) }"
standardController="Event">
<apex:pageBlock >
<apex:PageMessage summary="You are not allowed to delete Events" severity="Warning" strength="3"/>
<apex:pageMessages /> </apex:pageBlock> </apex:page>