Hide Recycle Bin from Home Page Layout
Salesforce
doesn't provide specifications to remove Recycle Bin from Home Page.But
there are situations which demands that the Recycle Bin shouldn't be
shown over the Home Page. In such adverse situations JavaScript is our
Best Friend.
First Let me tell you about this Dustbin of Salesforce.
The
Recycle Bin link in the sidebar lets you view and restore recently
deleted records for 15 days before they are permanently deleted.
Follow the following steps to Hide the Recycle Bin.
Click on Name > Setup > Customize > Home > Home Page Components.
Click on New to add a New Custom Component.
Make sure that you have checked WIDE COMPONENT and SHOW HTML Checkbox.
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>
<span id="hideMyParentsp">
</span>
<script>
$(document).ready(function() { $('#sidebarDiv #hideMyParentsp').parent().parent().hide(); });
</script>
<script type="text/javascript">
window.onload = function(){
var x=document.getElementsByTagName("img");
for(var i=0;i<x.length;i++) {
if(x[i].title=='Recycle Bin') {
var dtag = x[i].parentNode.parentNode.parentNode; dtag.style.visibility='hidden';
}
}
var xx=document.getElementsByTagName("span");
for(var ii=0;ii<xx.length;ii++) {
if(xx[ii].innerHTML=='Recycle Bin') {
xx[ii].style.display='none';
}
}
};
</script>
</script>
<span id="hideMyParentsp">
</span>
<script>
$(document).ready(function() { $('#sidebarDiv #hideMyParentsp').parent().parent().hide(); });
</script>
<script type="text/javascript">
window.onload = function(){
var x=document.getElementsByTagName("img");
for(var i=0;i<x.length;i++) {
if(x[i].title=='Recycle Bin') {
var dtag = x[i].parentNode.parentNode.parentNode; dtag.style.visibility='hidden';
}
}
var xx=document.getElementsByTagName("span");
for(var ii=0;ii<xx.length;ii++) {
if(xx[ii].innerHTML=='Recycle Bin') {
xx[ii].style.display='none';
}
}
};
</script>