+ Start a Discussion

how to leverage static resource in scontrol?

Suppose I have a js file in static resource.
How can I reference it in the scontrol
Thanks in advance
Something like this for VisualForce pages : {!$Resource.MyResourceFile}
but it does not seem to work in SControls.
You could try something not supported like this :
Upload your JS file to Salesforce.com as a Document.  Select the Document, and get the URL in the "Click here to view this file" link.  Put this URL in the Script tag's src attribute.
<script type="text/javascript" src="/servlet/servlet.FileDownload—file=015T00000006xxx"></script>

Please make sure that you make this document viewable to all uers that are going to access this S-Control.  Also, the user's profile must have Read permissions on Document object.  I hope this helps.