Skip to main content

I would offer you to use apex:detail as your solution.Below is the code example

<apex:page standardController="Event">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    ReadyFunc();
});
function ReadyFunc(){
    var a = $('[value$=pections]').first().attr('onclick');
    $('[value$=pections]').first().attr('onclick','ShowPopup();'+a);
}

<apex:detail relatedList="true" inlineEdit="true" relatedListHover="true" oncomplete="ReadyFunc();"/>
</apex:page>

You can do anything you want inside ypur document ready function automatically.

more information about : apex:detail

SOLUTION: apex:detail for event object doesnt display these buttons thus no JS needed at all, just replace standard page with apex:detail of a VF Page

umithuckan
  • 544
  • 3
  • 11