Dynamics CRM 9.0 : Multi Choice field

Dynamics CRM 9.0 is here and finally we got a very useful feature we as consultants and ISVs have always wanted to have.

A new type of field has been added which allows now users to have a multi selection optionset as you can see in the following screenshot. It can either be local or global just like ordinary Optionsets.

Note: getting the field value using javascript getAttribute method will return values separated by comma (ex: 1000001,1000002,1000003)












Interact with business process flows with Xrm.Page.data.process object

Dynamics CRM 2015 Update 1 offers a new interesting capability. You can now interact diretcly without trying to get the process ID as we used to do in the previous versions. So the magic object is Xrm.Page.data.process

It allows you to get the current process by using ActiveProcess method or the active stage by using ActiveStage method. There are many amazing other methods that can be very useful. I invite you to try them, here is where you can find all of these methods: https://msdn.microsoft.com/library/dn817878.aspx


Hope you like it!





Hide subgrid add button (+)

For some user experience issues, sometimes you may want to hide the + button on a subgrid. This is how to proceed:

If not already done, download JQuery and add it to your webresources then add the following HTML code as a webresource in the form containing your subgrid.


<script src=”/webresources/new_Jquery.js”></script>
$( document ).ready(function() {
if (parent.document.getElementById(“subgridname_contextualButtonsContainer”) != null ) {



Where subgridname must be replaced by your subgrid name.

IMPORTANT: Hiding the + button does not mean users cannot create new records, allowing or forbidding users to create new records should necessary be configured in their security roles.







CRM 2015 SDK: How to recognize user’s form factor and client

When you’re working on multi-device projects in Dynamics CRM, sometimes you need to know the form factor that the user is currently using in order to execute or note some UI actions using Javascript. Dynamics CRM 2015 makes it easier and suggests using the context object with getFormFactor() method that returns an integer between 0 and 3.

Javascript Code: Xrm.Page.context.client.getFormFactor()

Return Value Form Factor
0 Unknown
1 Desktop (Warning that does not mean Computer, it can also be a desktop version used from a tablet navigator)
2 Tablet Application
3 Phone Application

Let’s apply this to a simple example, we will run an alert box containing the name of the form factor on form loading:

Javascript Code: function myTestFunction()


var formFactor = Xrm.Page.context.client.getFormFactor();

if(formFactor == ‘1’) { alert(“Desktop”);}
else if (formFactor == ‘2’) { alert (“Tablet App”); }
else if (formFactor ==’3′) { alert (“Phone App”); }
else { alert (“Unknown form factor”); }


To get which client the script is executing in, you can use:


Javascript Code: Xrm.Page.context.client.getClient()

The return value of this method is a String. These are the returned values:

Client Value
Browser Web
Outlook Outlook
Mobile Mobile


For more client-side context methods, you can visit https://msdn.microsoft.com/en-us/library/gg334511.aspx






CRM 2015: Yes you can clear a field with Business Rules

If you have experienced Business Rules in Dynamics CRM 2013 you probably had to build a BR where a field must be cleared. Well that was not possible and we used to either make a two lines script or create another hidden field which is always empty and match the field you want to clear to that one. Fortunately CRM 2015 came with a new update making it possible when choosing a field’s value as you can see in this screenshot.


clear br





Dynamics CRM 2015 Update 1 – How to create a theme

CRM 2015 latest update has changed several issues regarding User Interface and made navigation easier with less scrollings and less clicks. Navigating in CRM 2015 now follows the same principles as Microsoft Dynamics Marketing. Check out this video to have further information about navigation and other features regarding Update 1.

Let’s have a glance to a new feature of this last update (UPDATE 1): Creating themes!

A theme is a set of customizations of the graphic interface that you can change to make it fit your corporate visual identity.

So let’s create our first theme, navigate to Settings/Themes then click +New

Note that you’ll use hex codes for your theme colors, here is a link that generates a hex code for every color selected http://www.w3schools.com/tags/ref_colorpicker.asp


settings customizations themes create new theme



The three main parameters (I mean those that you will see all the time when navigating) are the logo, navigation bar color and navigation bar shelf color. Here is a screenshot that explains correspondence between colors and items of navigation.

Note that the logo can make max to 400*50 pixels




You can also try to test other UI elements by picking other colors.


ui elements



Hope you’ll like it!