{New Tool}JavaScript Dependency Checker for Dynamics CRM 2011/2013

JavaScript Dependency Checker for Dynamics CRM 2011/2013

JavaScript Dependency Checker for Dynamics CRM 2011/Dynamics CRM 2013 is utility for all CRM administrators, consultants who have to deal with JavaScript issues

on CRM 2011/CRM 2013 and want a quick way to document scripts. It is also very useful during product upgrades. 

Refer following link: https://jscriptdependencycheckerdynamicscrm.codeplex.com/

Please share your feedback with me. Hope it helps!


{Error Resolution} Adding Security role for multiple users for Dynamics CRM 2011/2013

We landed in a situation recently where one security role was missing from all users of a business unit. I found the following way of quickly assigning it to all users:

Go to Settings-> Business Units-> Teams-> Open the default business unit team


Open the Business unit and assign the security role to this team:


Hope it helps!

Forcing document mode compatibility for IE: ASP.NET application talking to CRM 2013

Recently we faced an issue on ASP.NET application talking to CRM 2013, where document mode was always needed to be set to IE 9 in order for the UI elements and website controls to work properly. So, was digging on it and found the following way of doing it, add this to web.config:




<clear />

<add name=”X-UA-Compatible” value=”IE=9″ />




Following are possible values (referred from MSDN):

X-UA-Compatible value

Document modes


Quirks mode


IE7 mode


IE8 mode


IE9 mode


IE10 mode


IE11 mode


The highest supported document mode of the browser


IE7 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)


IE8 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)


IE9 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)


IE10 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)


IE11 mode (if a valid <!DOCTYPE> declaration is present)

Quirks mode (otherwise)

Hope it helps!

{Tips and Tricks}Show/Hide Business Process Flow in CRM 2013 Form

Often, there is a case on CRM 2013 form, when we want to utilize the UI area for viewing details and have an ability to show/hide business process flow area:

Taking example of Sample opportunity Business process flow here:


We can click the arrow like this and the business process flow area collapses:


This is how it finally seems:


What if now I want to even hide this stuff and use the entire area? Something like(I am clicking the checkbox here on the form):



And when I move away from the checkbox:


The good fact about this approach is that if value of checkbox is saved, It is kind of sticky form view if checked on form load along with on change events. Now, the script:

function showHideBusinessProcessFlow()

{    if (Xrm.Page.getAttribute(“new_showbusinessprocessflow”).getValue() == true)

    {       $(“#header_process_d”).css(“display”, “block”);    }

    else    {           

  $(“#header_process_d”).css(“display”, “none”);



Note: This is unsupported script and might break with future Microsoft updates.

Hope it helps!

{Tips and Tricks} Configurable Console Application Batch Jobs for Dynamics CRM 2011\2013

Often we keep getting requirements to do one time update or to schedule an update on some entities and the criteria for updating the set of entities is not sure. So, I wanted to devise a configurable way of doing it. The way is to have a personal view, share it with client and utilize it for fetching the entities. Following function block takes a personal view name as input and returns you the Entity Collection:

/// <summary>

/// Fetches the view collection.

/// </summary>

/// <param name=”service”>The service.</param>

/// <param name=”viewName”>Name of the view.</param>

/// <returns></returns>

private static EntityCollection FetchViewCollection(IOrganizationService service, string viewName)


QueryExpression query = new QueryExpression(“userquery”);

query.ColumnSet = new ColumnSet(true);

query.Criteria.Conditions.Add(new ConditionExpression(“name”, ConditionOperator.Equal, viewName));

EntityCollection viewCollection = service.RetrieveMultiple(query);

if (viewCollection.Entities.Count == 1 && viewCollection.Entities[0].Contains(“fetchxml”))


var fetchExpression = new FetchExpression((string)viewCollection.Entities[0].Attributes[“fetchxml”]);

return ((EntityCollection)service.RetrieveMultiple(fetchExpression));




return null;



Just plug it to start of your console application for batch job and you can make it configurable for updates. Hope it helps!

{Trips and Tricks}Error codes in Dynamics CRM 2013

Often we face issues in plugins and get error codes from CRM while debugging our server side code.

For e.g.

Error code 80048531 means CustomImageAttributeOnlyAllowedOnCustomEntity which is

A custom image attribute can only be added to a custom entity.

Just happened to pass by a cool resource containing the error codes and their descriptions. It is available on following path in CRM 2013 SDK:


has excel named CrmErrors

Refer to image below:


Hope it helps!