0 out of 1 rated this helpful - Rate this topic

Script (JScript) Web Resources

Use Script (JScript) Web resources to create a library of JScriptfunctions that can be accessed from anywhere.

Capabilities of Script Web Resources

With Script Web resources, you can more efficiently manage code used in form scripts, Web page (HTML) Web resources, or Ribbon commands by linking them to shared library of JScript functions.

Limitations of Script Web Resources

Like all Web resources, script Web resources use the Microsoft Dynamics CRM Web application security context. Only licensed Microsoft Dynamics CRM users who have the necessary privileges can access them.

noteNote
References included in code between Web resources are not tracked as solution dependencies.

Script Web Resource Tasks

Script Web resources are intended to support development of Web page Web resources and Ribbon commands.

Using JScript Libraries

For information about developing and testing JScript libraries as well as how to associate them with Ribbon commands and Form events, see JScript Libraries for Microsoft Dynamics CRM.

Referencing a Script Web Resource from a Web Page Web Resource

All Web resources can use relative URLs to reference each other. In the following example, for the Web page Web resource new_/content/contentpage.htm to reference the script Web resource new_/scripts/myScript.js, add the following HTML code to the head element of new_/content/contentpage.htm:

<script type="text/jscript" src="../scripts/myScript.js"></script>

To reference a script from a different publisher, the path must include the customization prefix for that publisher. For example, for the new_/content/contentpage.htm page to reference the MyIsv_/scripts/customscripts.js page, the src attribute value should be ../../MyIsv_/scripts/customscripts.js.

See Also

Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online
Send comments about this topic to Microsoft.
© 2012 Microsoft Corporation. All rights reserved.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ