+ Start a Discussion

Adding an S-Control to the Home Tab

Is there a way to add an S-Control to the Home tab?  If so, how?


You may add an embedded SControl to the Home Page Layout by creating a Home Page Component. To do this, go to Setup -> [App Setup] Customize -> Home -> Home Page Components -> [Custom Components] New. Name the SControl area and choose the HTML Area option. In the editor, click the Show HTML checkbox so you can edit the source. You may paste the HTML/Javascript in here. Note that you will have to add it to the Home Page Layout after you are done creating the component. Also note that I'm not sure of the flexibility you will have with merge fields using this method (haven't tried them personally).

This isn't an ideal solution if you already have an SControl in your library that you want to reuse as embedded content, but it's a simple solution.

If you just want a link to an SControl, you can do that by adding a Custom Link to a Custom Component then displaying that in the sidebar on the Home Page Layout.

If there is a cleaner way to add an embedded SControl to the home page layout, by all means post it here :) Since the home page does not seem to allow for the layout flexibility that the other objects have, this is just a work around I have found helpful.

Hope this helps!
This did not work for me; SFDC stripped all the javascript out of the control. Is there something special I have to do to prevent this?
Did you enclose your Javascript in <script> tags? Below is a test HTML area Home Page Component that I have in my DE (set as a wide component):

<script type="text/javascript">alert("Javascript initiated");</script>

This script will open an alert window when the Home tab is loaded. Also ensure that you click on the "Show HTML" checkbox in the custom component edit window, otherwise your Javascript will be output as plain text.


Crazy! It works in production, but not the sandbox! Now to solve another mystery.


What I wound up doing is as follows:
1.  Create your s-control.
2.  Create a custom link under Setup >Customize > Home tab > Custom Links.  (Link to the s-control).
3.  Create a Home Page Component under Setup >Customize > Home tab > Home Page Components.

This will embed your s-control into the Home tab.

I hope this helps others.


Here's what actually worked in my sandbox..

<IFRAME src="/servlet/servlet.Integration?lid=00bT0000000itMm&amp;eid=00540000000yCFm&amp;ic=1" frameBorder=0 width="100%" height=150></IFRAME>

Thanks to Scott of Arrowpointe.