You need to sign in to do that
Don't have an account?
Opster
Run custom javascript across all salesforce pages?
I am wondering if and how I can run some custom javascript across all my salesforce pages? I tried adding my javascript to a Custom Component on the home bar, but when I try and save the component it deletes all my javascript out.
I dont't want to add the javascript to each object with a layout. I simply want this javascript to be executed onload of every page across my org.
Any help is greatly appreciated, and thank you in advance.
Hi,
You can use a visualforce for that purpose, The trick is create a visualforce page without any controller, placed your javascript in this page within <script></script> tag. Now create a custom home page component with type of "HTML Area" an in this component write the following code -
<iframe src="/apex/yourPageName" height="60" scrolling="no" width="180"></iframe>
Adjust width & height acoordingly and save this component, now go to home page layout--> add this component to layout.
Hope it shud help u !
But when the side bar is closed this code is no longer run. So your solution will also only work on pages that have the side bar enabled.
Exactly, This thing is totally dependent on side bar. I dont think there is another way to do the same.