User Security Manager – My first XrmToolBox Plugin

Being one of the biggest fan and the most frequent daily user of XrmToolBox, always had this wish to write a plugin for it.

Thanks to Prashant Maurya  (a dear friend and ex-Microsoft Employee) for making this wish come true. (Who played the major role in developing it).

The tool is called – User Security Manager.

The Plugin make it easy for the administrators to manage all the security related aspects of the system users. The tool also gives 360-degree information of the user in correspondence to business unit, security roles and teams.

In our current project we had around 180 users using the system divided into more than 50 business units, which involved frequent update of their business unit, changes in the security roles assigned, update in team assignment and also during testing we had to assign the same BU and roles to the test users in the org, which wasn’t that easy to do from the user interface.

So, the idea was to come up with a tool that will let an administrator to

  • View all the security roles that assigned to the user either directly or through the team that the user is member of.
  • View all the Teams the selected user is part of.
  • With just a single click, remove all the security roles assigned to the user.
  • With just a single click, remove user from all the teams that he is part of.
  • Easily assign and unassign single or multiple security role to the user.
  • Easily add or remove user from a single or multiple team.
  • Change the Business Unit of the user.

User Guide: –

Load all the users

After connecting to the organization, we can click on Load Users to load all the system users of the organization.

List details of the user selected

  • For the selected user, in User Detail Tab’s General section, we can get the general information of the user like First Name, Last Name, Title, Primary Email and Access Mode.
  • Next to the General section, we can see all the security roles assigned to the user either directly or through the teams the user is member of.
  • The Roles tab shows all the Roles assigned to the user and also the roles that are available in the business unit to which user belongs in Assigned and Available section along with their counts.
  • The Teams tab shows all the teams user is member of and also the teams that are available in the organization in Assigned and Available section along with their counts.

Remove all security roles of the user.

To remove all the security roles of the user, click on Remove All Roles button.

Remove user from all teams.

To remove the user from all the teams, click on Remove All Teams button.

Assign Security role to the user.

To assign security role to the user, check the security roles from the available security roles section and click on “<<” button.

To remove security role from the user.

To remove security roles from the user, select the roles from the Assigned section and click on “>>” button.

Assign User to Team(s).

To assign user to team(s), select the teams from the available section and click on “<<” button.

Remove user from Team(s)

To remove user from Team(s), select the team from the Assigned Section and click on “>>” button.

Change the business unit of the user.

To change the business unit of the user, select the Business Unit from the Business Unit drop down in General Section of User Details.

Please install it, use it and share your feedback which would help us to improve it

https://www.xrmtoolbox.com/releases/

Hope it helps..


			

When does the Plugin registered on SetState message fires in Dynamics 365?

Hi,

Recently we were writing a plugin that should fire when a record is activated.

In this kind of scenario, it is suggested\recommended to register plugin in both SetState and SetStateDynamicEntity message.

https://community.dynamics.com/crm/f/117/t/184070

https://blogs.msdn.microsoft.com/crm/2008/03/07/developing-plug-ins-for-crm-4-0/

Interestingly we had the following observations

  • The Plugin fires only for SetStateDynamicEntity message.
  • The Plugin fires even if the SetState message step is disabled or not registered.
  • Only SetStateDynamicEntity message is fired when the record is Activated or Deactivated. For incident entity also, it was the only message fired on Reactivating the record. The plugin didn’t trigger in case of Resolve or Cancel Case.
  • Only SetStateDynamicEntity message is fired, even if we are updating the state of the record using SetStateRequest of SDK.
  • As SetStateRequest message is deprecated, if we use UpdateRequest to update the state of the record, the plugin that is registered on SetState and SetStateDynamicEntity will not fire. It will trigger only if registered for Update message.

Plugin Trace log records :-

We are yet to figure out when exactly the SetState will be fired. Please share your thoughts and experience around the same.

Hope it helps..

Sample Plugin code to run on Reactivate Case (Incident) in Dynamics 365

Just sharing a sample code that runs on the Activation of case (incident) record and updates one field in it.

We need to register the plugin in both SetState and SetStateDynamicEntity message. Interestingly what we found was the plugin runs perfectly even if it is registered only for SetStateDynamicEntity. It triggers properly either we update it from CRM UI or through the CRM SDK for SetStateDynamicEntity message.


protected override void ExecuteCrmPlugin(LocalPluginContext localContext)
{
if (localContext == null)
{
throw new InvalidPluginExecutionException("localContext");
}

// TODO: Implement your custom Plug-in business logic.

var context = localContext.PluginExecutionContext;
var tracingService = localContext.TracingService;

if (context.InputParameters.Contains("EntityMoniker"))
{
tracingService.Trace("Inside Entity Moniker");

var targetEntity = (EntityReference)context.InputParameters["EntityMoniker"];
if (targetEntity.LogicalName == "incident")
{
tracingService.Trace("Inside Incident");

int state = ((OptionSetValue)context.InputParameters["State"]).Value;

tracingService.Trace("State = " + state);

// if status is active
if (state == 0)
{
tracingService.Trace("State Active");

// update one field in the record
Entity incident = new Entity("incident");
incident.Id = context.PrimaryEntityId;incident.Attributes["sab_fash_casestatusid"] = new EntityReference("sab_fashioncasestatus", new Guid("6F456BDC-CD7D-E811-813C-5065F38B15F2"));
localContext.OrganizationService.Update(incident);
tracingService.Trace("Record Updated");
}

}
}

}
}

Hope it helps..

MVP’s around the World

Interesting data !

EighTwOne (821)

mvpUpdated July 3rd:  Includes newly registered awardees and awardees who changed category. Added overview of Office Servers and Services numbers over last couple of years.

With the latest annual award cycle, one might be curious which impact it had on the MVP population. I performed a similar exercise last year to compare the impact of the start of the new award cycle. This year, all the MVP’s previously on the January and October cycles were also included in the reviews, making this year the first one where MVP leads and others had to perform the dauntless task of reviewing community contributions of over 3,500 people.

For comparison, I had a look at the public MVP statistics of July 1st against those of June 26th, to exclude significant noise from the monthly awardees. To start, let us first have a look at the total population of MVP’s. From the numbers…

View original post 618 more words

{Quick Tip} Manage your Entity Forms when your CRM is exposed to Web and Mobile App

Debajit's Dynamic CRM Blog

Spoiler alert! Unlike other blogs, I am not going to update you about any new feature. Rather I am going to share my project experience in handling multiple forms designed for your Web and Mobile layouts.

You have exposed you CRM recently to Mobile Apps. When you expose your CRM to Mobile Application development, in most of the scenarios you would end up designing separate forms. Let’s take the example of Account entity. Say you have designed two forms

  • Account Web Form – This form is displayed to users while accessing CRM to Web
  • Account Mobile Form – Form displayed to users while browsing CRM on Mobile

And you have your users who will just access CRM through desktop and then some users accessing CRM through both Desktop and mobile.

First of all, as I have been across client locations, I find that some consultants still assume that to expose…

View original post 415 more words

My Interview at MSDynamicsWorld.com

Check out my interview at MSDynamicsWorld.com

https://msdynamicsworld.com/story/dynamics-crm/microsoft-dynamics-profile-nishant-rana-goes-man-series-cricket-mvp

2018-06-16_0941

Thanks MSDynamicsWorld.com and Linda Rosencrance.