+ Start a Discussion

how to remove Search option on the top of salesforce main window


 i have problem of logo fitting in my project due to search option present in salesforce main window so i want help to remove search option.  



Ankit AroraAnkit Arora

If you want to remove standard search from home page, it's not possible by any configuration but there is a work around using JS


Create a new html component in narrow home  page component, add below script code in it 


<div id="demoContainer"><script 
pa.style.display = "none";}catch(err){alert('There was an error on this
language="JavaScript">function removeSerchbox(){var a = [];var re =
new RegExp('\\bsearchCell\\b');var els =
document.getElementsByTagName("td");for(var i=0,j=els.length; i<j;
parent=a[0];parent.style.display='none';} var oldonload = window.onload;
  if (typeof window.onload != 'function')    {     window.onload =
oldonload;   } else {     window.onload = function() {      if
(oldonload) {      oldonload();    }    removeSerchbox();   }  }


Let me know if you still face any problem.



Ankit Arora

Blog | Facebook | Blog Page

Shailesh DeshpandeShailesh Deshpande
The search option that appears at the top besides the app logo is the GLobal Search which is enabled when you enable the chatter. If your org is OK with not using chatter, then you can disable the chatter. With this you will have search box present on the sidebar instead of having it besides app logo.

P.S. I myself would prefer the solution provided by Ankit though.
I added the component but can still see the search bar at the top of the home page. Am I missing anything?