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];
{
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.
No comments:
Post a Comment