Salesforce – Hide standard buttons display
Below version isn’t working due to cross domain issues (As visualforce pages are served from *.force.com domain and salesforce standard pages are served from *.salesforce.com domain, so it results in cross domain errors).
Please read new working version @ http://www.chiragmehta.info/chirag/2010/08/16/salesforce-hide-standard-buttons-display-working-version/
There are many a times where we want to remove few standard buttons from page layout, but there is no such option to remove such restricted buttons. Few such buttons are …
Following is a solution which will hide “Save & Send Invitation” button on New Event page
STEP1: Visualforce Code
<apex :page sidebar="false" showHeader="false">
<script language="javascript" type="text/javascript">
window.onload = new function()
{
window.parent.document.getElementsByName("sendEmail")[0].style.display = 'none';
window.parent.document.getElementsByName("sendEmail")[1].style.display = 'none';
}
</script></apex>
STEP2: Create a Home Page Component of type (HTML Area)
<iframe src="/apex/aboveVFPageName" frameborder="0" width="100%" height="100"></iframe>
STEP3: Add above created Home page component in your home page layout.
That’s it you are all set, now open New Event and add invitees, automatically the “Save & Send Invitation” button will disappear.
Seems like these is an issue to the fact that Salesforce has moved VF pages away from the original servers to another server.
Just googled around, e.g. http://community.salesforce.com/t5/Visualforce-Development/Please-explain-cs2-salesforce-com-vs-c-cs2-salesforce-com/m-p/110601 .
But no solution found yet, anybody any ideas?
Please refer to http://www.chiragmehta.info/chirag/2010/08/16/salesforce-hide-standard-buttons-display-working-version/