Styling Web Resources in Dynamics Crm 2016 Supported

Angular2 for Custom HTML Webresources in Dynamics CRM 2016?

Yes I've created a quickstart project which aims to support building single page applications for Dynamics CRM in Angular. The project uses ADAL to authenticate with Dynamics.

How can we use Validation groups and Render Web Resources Inline in MS CRM portals?

Validation Group and Render Web Resources Inline are additional settings in portal entity form configuration.

ValidationGroup: The group name assigned to input controls for evaluating valid input of named groups.

If you set this in entity form configuration, then in case if you are doing some custom validation in client side using js, Validation Group can be specified in custom validator. Read more

RenderWebResourcesInline: CRM wraps Web Resources in an iframe by default. Set to "true", indicates that Web Resources should be rendered without an iframe.

This is to tell platform to differentiate as the same form is rendering in CRM platform & Portal as well. CRM will render HTML webresource inside IFRAME, which we don't need in Portal side.

MS Reference & AdXstudio Reference

Dynamics Web Resource opening a dynamic window

You might be better off modifying the ribbon on the entity to include a new button. This button can pass parameters to the web resource

This achieves the following:

  • Removes the need to have a CRM field containing the Web Resource URL
  • Simplifies your webresource javascript (i.e. removes dependencies on window.top.opener)
  • Better supported/standard customisations

To configure your ribbon, download the XrmToolbox and use the Ribbon Workbench plugin

  1. Add a new Button to the ribbon
  2. Configure a Command for the button
  3. Add parameters to the Command. One is PrimaryControl and the other is CommandProperties

Button Setup

Then in your webresource, you should see the querystring has been appended with some new properties. These can be used to get the UserId and RecordId

My Code for web resources javascript is running on chrome but not in IE 11 of dynamics crm

You're using arrow => functions. IE11 doesn't support them. Arrow function come under ES6 which is not yet supported by IE11.

There are lot of online tools which will help you convert ES6 to Es5

Convert below function

element1.addEventListener("mouseover", (e) => {
tooltipSpan1.style.display = "inline";
tooltipSpan1.style.top = (e.clientX + 20) + 'px';
tooltipSpan1.style.left = (e.clientY + 20) + 'px';
});

to something like below

element1.addEventListener("mouseover", function(e) {
tooltipSpan1.style.display = "inline";
tooltipSpan1.style.top = (e.clientX + 20) + 'px';
tooltipSpan1.style.left = (e.clientY + 20) + 'px';
});


Related Topics



Leave a reply



Submit