Wednesday, October 26, 2011

How to Check Whether a User has the User Role

This was a functionality that could be acheived in CRM 4 using javascripts. Jim Wang has written a nice article about this.

However with CRM 2011 there is an inbuilt javascript functionality to retrieve the roles of a user. This however will return the Guid's of the user. 

var currentUserRoles = Xrm.Page.context.getUserRoles();
    for (var i = 0; i < currentUserRoles.length; i++)
     var userRole = currentUserRoles[i];

There is a nice article written by Mitch Milam in the below URL of getting this done with user role names.

Thanks Guys for putting these wonderful articles.

Thursday, October 13, 2011

Sorting by multiple columns in a GRID (CRM 2011)

This is possible with CRM 2011. All you have to do is to hold to the shift key and select the columns that you want to sort the result set. It’s as easy as that.

Retrieving Calendar of a Bookable Resource in Dynamics

There are occasions where we need to retrieve working days and working times of a resource in Dynamics grammatically. This is quite possible...