5

I was just checking out this app in the AppExchange, and I want to implement something similar in my own company: https://appexchange.salesforce.com/listingDetail?listingId=a0N30000005ueMvEAI

Any idea what they're doing to embed their "ticker" content above the tab pane for all SFDC pages?

5

This is a Home Page component that is embedded on the side of most pages.

You can run custom code from the sidebar using the general following steps:

First, click on Setup > Customize > Home > Home Page Components > New (HTML, narrow). Next, toggle the HTML view mode (the checkbox). Then, enter in some sort of JavaScript. For example, you might do something like this:

<script src="/resource/myLibrary" type="text/javascript"></script>

Click "Save" without unchecking the HTML view option.

Next, Setup > Customize > Home Page > Home Page Layouts, create or modify an existing layout to use the new feature. Also, assign the layout to profiles that should be able to see the feature.

Finally, Setup > Customize > User Interface, make sure you are showing custom home page components on all pages.

In this example, the source was uploaded to a Static Resource called myLibrary, so you'd want to do the same if you chose to use a Static Resource. You could also host it as a Document, an Attachment, or on some external server (but I would strongly recommend it be served from an HTTPS link).

The script itself could be whatever you choose to do. In their case, they perform a document query to find the tab bar, then insert their own custom element immediately above/before it. From there, it's all JavaScript, querying new data, that sort of stuff.

I myself had implemented Multilingual Field Level Help some years (May 2007) before salesforce.com released their own version; it used the same logical concept of embedding code in the sidebar. Unfortunately, it's an S-Control and uses obsolete browser technology, so it doesn't function, but it was a decent proof of concept.

  • Thanks! I just tried this and, with a little DOM manipulation, got a good working version! – chowes Sep 26 '13 at 20:44
  • Thanks, I managed to get this partially working - my script tag was embedded nicely in the home page (using the default layout). However, I could not find the "show custom home page components on all pages" option you referred to under Setup > Customize > User interface, and so the script tag is not embedded on any other tab. Is there some additional setting to enable that? – odedbd Oct 13 '13 at 9:01
  • To answer myself - I found the setting is for showing custom Sidebar components on all pages, so my tag is now embedded on all pages that have the sidebar in them – odedbd Oct 13 '13 at 9:55
  • I just tried this and it is not working, is there any other workaround? – cartman May 6 '16 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.