You need to sign in to do that
Don't have an account?
anil savaliya 11
Sidebar home component doesn't work after summer 15 with Javascript
Hey,
As we know salesforce removing Javascript support from side bar home component after summer 15,Also salesforce added visualforce in home componenet,Since Visualforce page in iframe.Visuaforce in home component is not able to interact with salesforce standard UI.
Any Idea or any research or javascript , we should control standard salesforce UI through home component.
Thanks,
Anil
As we know salesforce removing Javascript support from side bar home component after summer 15,Also salesforce added visualforce in home componenet,Since Visualforce page in iframe.Visuaforce in home component is not able to interact with salesforce standard UI.
Any Idea or any research or javascript , we should control standard salesforce UI through home component.
Thanks,
Anil
1. create a StaticResouce "YourStaticResourceName" upload a JS file containing whatever you need (e.g. jquery) and add a command in the end, like 2. console.log('bingo!');
2. go to Setup > Home > Custom Links
3. create a new link call it "injection"
4. Behaviour = "Execute JavaScript"
5. Content Source = "Onclick JavaScript" (don't get irritated, you won't have to click!)
at the body enter {!REQUIRESCRIPT("/resource/1402932484000/YourStaticResourceName")}
6. go to Setup > Home > Home Page Components
7. create a new one
8. call it "injection-box"
9. pick type "Links" (instead of HTML-Area we used before)
10. click next
11. pick "injection" we created above
12. save it
13. got to Setup > Home > Home Page Layouts
14. add "injection-box" to your layout
go to anywhere it worked before and check for 'bingo!' in your console. See that 'YourStaticResourceName' is successfully injected to the standard pages :-)
And finally it seems to be even officially supported, look at this:
http://help.salesforce.com/HTViewHelpDoc?id=customize_functions_i_z.htm#REQUIRESCRIPT
All Answers
1. create a StaticResouce "YourStaticResourceName" upload a JS file containing whatever you need (e.g. jquery) and add a command in the end, like 2. console.log('bingo!');
2. go to Setup > Home > Custom Links
3. create a new link call it "injection"
4. Behaviour = "Execute JavaScript"
5. Content Source = "Onclick JavaScript" (don't get irritated, you won't have to click!)
at the body enter {!REQUIRESCRIPT("/resource/1402932484000/YourStaticResourceName")}
6. go to Setup > Home > Home Page Components
7. create a new one
8. call it "injection-box"
9. pick type "Links" (instead of HTML-Area we used before)
10. click next
11. pick "injection" we created above
12. save it
13. got to Setup > Home > Home Page Layouts
14. add "injection-box" to your layout
go to anywhere it worked before and check for 'bingo!' in your console. See that 'YourStaticResourceName' is successfully injected to the standard pages :-)
And finally it seems to be even officially supported, look at this:
http://help.salesforce.com/HTViewHelpDoc?id=customize_functions_i_z.htm#REQUIRESCRIPT
Thanks for Explanation.It's work awsome. :)
Thanks @Gaurav!
You should quote the source when you simply pick up the solution.
- Extend field width in edit pages. The default width of text fields is very narrow.
- Remove words from labels which are repeating words already in the section header title, greatly simplifying page layouts.
- Renaming specific page header titles that share the same Object (with different Record Types) to remove confusion for the users.
I found this article, which claims that running javascript from the sidebar is no longer supported: http://salesforce.stackexchange.com/questions/38918/end-of-javascript-sidebar-workarounds
Although it mentions VisualForce Area component as a possible alternative, it clearly states that VisualForce Area components run in an iframe which prevents any javascript in it from interacting with the main page. This article also confirms this: https://help.salesforce.com/HTViewHelpDoc?id=home_page_components_custom_vf_overview.htm&language=en_US
What are my options? It would really be awful to lose all our customizations, which we have come to rely on.