Friday, 12 February 2016

Dynamics CRM Funky Customizations

We know non-supported customizations is a big no! unless it makes sense and simplifies your users life.

The javascript code I'm sharing on this post are all DOM manipulations, they are quite handy. I have used them since CRM 2013 first release, have installed roll-ups upgraded to CRM 2015 and CRM 2016 and never had issues with it.

Highlight Mandatory Fields
Do you get users complaining is not easy to identify the missing mandatory fields? the below code highlights the entire field in red to make it more obvious what are the missing fields.

$(document).ready(function () {
$("#header_process_myField").css("background-color", "rgba(255, 179, 179, 1)"); });

Note that we passing a RGBA code, this means you can make your own colour. The below screenshots shows the end result:

Increase the BPF sidebar height
Another question often asked is related with the size of the BPF sidebar, is to small and new users don't realize they actually can slide to the right.

Another small piece of code can help our users:

 $(document).ready(function () {
 $(".ui-slider-handle").css("height", "8px");

How to add BPF Tooltips
I think this is a big miss from Microsoft, why the BPF fields don't have tooltips? I don't know!! Currently they simply repeat the name of the field, with the below code you can define the tooltips for your fields in the BPF section

var toolTipSet = [{ "field": "MyField1", "text": "This field is used for xxx" },
            { "field": "MyField2", "text": "And this field is used for yyyy" },        
 $(document).ready(function () {
var controlId;
        for (var i in toolTipSet) {
            controlId = '[id^="header_process_' + toolTipSet[i].field + '"][id$="_c"]';
            $(controlId).attr('title', toolTipSet[i].text);

1 comment:

  1. This is really very useful information for me. i really like it very much. thanks for sharing it!!!

    ca devops solution