July 2017 Preview Update- Web Resource New Capabilities

Web Resource New Capabilities
July 2017 Preview Update- Web Resource New Capabilities
Posted 11.13.2017 By admin

Web resources are HTML, JavaScript, Image, CSS, XML files that can be used to extend the Microsoft Dynamics 365 web application. These web resources can be used in form customizations, ribbons, sitemaps and can be placed in IFrames also.

With July 2017 Preview update, Microsoft introduced new capabilities.

New Resource Type:
Now there are two new type of web resources

  1. Vector Image: Now SVG (Scalable Vector Graphic), XML based vector images can be used as icons.
  2. RESX files: These types of files can be used for localization.

RESX file must contain locale identifier in its name for example “MyCustomResource.1033.resx” for English language and “MyCustomResource.3084.resx” for the French language. Resource files basically contain a key and a relative string value for the specific language. The data is stored in RESX XML format.

To get a value for specific key in resource file we can use the syntax Xrm.Utility.getResourceString(“MyCustomResource”,”Defacto”) where “MyCustomResource” is the name of my RESX file without locale number and “Defacto” is the key. Now based on the user’s preferred language if its “French”, then it will look for the specific key in “MyCustomResource.3084.resx”.

Web Resource Dependencies

Now JavaScript Web resources and have two new type of dependencies:

  1. Attribute Dependency
  2. Web Resource Dependency

Before this release, if we need to access an attribute in JavaScript, that attributes need to be placed on the Form. But now using Attribute dependency we can access the entity attribute directly from JavaScript without any need to place that attribute on the form. Attribute dependency will make it available in client API attribute collection.

Another important feature is Web Resource dependencies. With this now all other web resources that are part of dependency of Web Resource will be loaded along with main web resource. The important thing to note in this case is that all web resources will be loaded asynchronously so this will not allow the resources to be downloaded in any particular sequence. This feature can also be used if we need to load any localized RESX Resource files with JavaScript resource.

We can even create a dependency chain, in which dependent web resources can have further dependencies. Only the published web resources can take effect in dependencies.

Note: Information provided in this article is based on July 2017 Update Preview. This feature may change during release and is at Microsoft Discretion.

1 Comment
  1. this is a test comment

Leave a Reply

Your email address will not be published. Required fields are marked *