Calling Javascript functions from hosted file

Posted by mnashi on 11-Oct-2015 08:35

I have created few functions in hosted javascript file. I want to call those functions in lookup field events at the client side. Is it possible? 

All Replies

Posted by Mohammed Siraj on 12-Oct-2015 02:35

Yes, this is possible.

Make sure that hosted JS files are loaded by client browser. For this, Add a script/html component to reference the hosted file using its token. Or, for this file to be available to all pages, add a script reference to Custom-Sidebar/Header-Footer.

Eg:

<script src="{!#HOSTED_FILE.766952}" />

This thread is closed