Microsoft Dynamics 365 Web Resources
Another client-side tool for extending Microsoft Dynamics CRM is through the use of web resources. Microsoft Dynamics CRM web resources are “web” files that are stored within CRM that contain content that is useful for integrating web page functionality into the Microsoft Dynamics CRM interface.
The simplest example of a web resource is an image file. You can store an image in CRM as a web resource and use the image on forms or other user interface elements throughout the system.
One of the more complex examples of a web resource is a Silverlight application. You can build a robust Silverlight application that reads the context of the users and/or entity, access data from entities, and extend the functionality of the system.
Because web resources are stored within the Microsoft Dynamics CRM database, they can be reused throughout the system in different forms or entities and can be deployed using Solutions.
The following are the most common types of Web Resources within Microsoft Dynamics CRM along with their common usage and implementation:
Web Pages or Style Sheets
An HTML web resource allows a developer to imbed custom HTML code on forms that extend either the presentation and/or functionality of the form. Style sheets can be uploaded as a web resources as well, and used by HTML pages to more efficiently update the appearance of the web page.
The HTML can be used to display a single HTML control, like a custom drop list; or it can contain an entire page of data controls that collect a larger collection of data.
While HTML pages can be added to CRM as a web resource, the HTML cannot include code that requires server processing. All code must run on the user’s client browser.
Data can be stored within a web resource in XML format. While this technique can be used as a method to cache data, it is not recommended. Often the XML web resource is used to store static settings or configuration data, then accessible by parsing the XML for setting values.
Common web image types (jpg, gif, png, and ico) can be stored in CRM as a web resource, which then allows a developer or customizer to display that image in various locations. For example:
- Use an image as an icon for ribbon buttons/controls, site map nodes
- Images used to identify form/entity
- Display images on an HTML or other web page web resource for backgrounds or identifiers.
Microsoft Dynamics CRM supports and hosts compiled Silverlight applications as an option for presenting a more robust user interface that can handle a richer dataset than CRM forms.
When developing a Silverlight application, CRM will commonly pass to the application the context of the data and user. In addition, the Silverlight application can use CRM’s Organization Data Service (an oData service exposed via a REST-based) to work with additional related data outside of the context that was passed to it.
You can present a Silverlight resources as an imbedded object on a CRM form or it can be presented within a host HTML page (also a CRM web resource). Because Silverlight is a client-side resource, it offers speed, performance, and flexibility when extending CRM.