Hi, Would like to know whether it is possible to trigger a plugin when enabling or disabling a User. Can't figure out I should register my plugin to which event. Look like the User Entity do not support the SetState Event, and i tried to subscribe to the Update Event, but the plugin just not firing. Hope that someone can give some guidance. Thanks
Hi Why do you want to do that? We disabled it from security perspective as user disabling restricts to keys licensed in CRM. -- Thanks AjithG [MSFT] http://code.msdn.microsoft.com/crmplugin http://code.msdn.microsoft.com/crmpluginsamples This posting is provided "AS IS" with no warranties, and confers no rights. "Thalia Mei" wrote in message news:33D3F93A-A82A-4356-8EB2-881DDBB292E3@microsoft.com... > Hi, > > Would like to know whether it is possible to trigger a plugin when > enabling or disabling a User. Can't figure out I should register my plugin > to which event. Look like the User Entity do not support the SetState > Event, and i tried to subscribe to the Update Event, but the plugin just > not firing. > > Hope that someone can give some guidance. > > Thanks >
The objective of the plugin is to make sure enabling/disabling User are Audited. The plugin will be creating an audit record (Customized Entity - Audit) that run under Administrator credential. An user can be enable/disbale several times, so the Audit Trails is very important. Thanks "Ajith [MSFT]" wrote in message news:OzEnUyM%23IHA.1228@TK2MSFTNGP02.phx.gbl... > Hi > > Why do you want to do that? We disabled it from security perspective as > user disabling restricts to keys licensed in CRM. > > -- > Thanks > AjithG [MSFT] > http://code.msdn.microsoft.com/crmplugin > http://code.msdn.microsoft.com/crmpluginsamples > This posting is provided "AS IS" with no warranties, and confers no > rights. > > "Thalia Mei" wrote in message > news:33D3F93A-A82A-4356-8EB2-881DDBB292E3@microsoft.com... >> Hi, >> >> Would like to know whether it is possible to trigger a plugin when >> enabling or disabling a User. Can't figure out I should register my >> plugin to which event. Look like the User Entity do not support the >> SetState Event, and i tried to subscribe to the Update Event, but the >> plugin just not firing. >> >> Hope that someone can give some guidance. >> >> Thanks >> > >
You can register on Update on Child pipeline to catch that. -- Thanks AjithG [MSFT] http://code.msdn.microsoft.com/crmplugin http://code.msdn.microsoft.com/crmpluginsamples This posting is provided "AS IS" with no warranties, and confers no rights. "Thalia Mei" wrote in message news:32D2D2FB-2082-4184-9013-66D9FE289979@microsoft.com... > The objective of the plugin is to make sure enabling/disabling User are > Audited. The plugin will be creating an audit record (Customized Entity - > Audit) that run under Administrator credential. > > An user can be enable/disbale several times, so the Audit Trails is very > important. > > Thanks > > > > "Ajith [MSFT]" wrote in message > news:OzEnUyM%23IHA.1228@TK2MSFTNGP02.phx.gbl... >> Hi >> >> Why do you want to do that? We disabled it from security perspective as >> user disabling restricts to keys licensed in CRM. >> >> -- >> Thanks >> AjithG [MSFT] >> http://code.msdn.microsoft.com/crmplugin >> http://code.msdn.microsoft.com/crmpluginsamples >> This posting is provided "AS IS" with no warranties, and confers no >> rights. >> >> "Thalia Mei" wrote in message >> news:33D3F93A-A82A-4356-8EB2-881DDBB292E3@microsoft.com... >>> Hi, >>> >>> Would like to know whether it is possible to trigger a plugin when >>> enabling or disabling a User. Can't figure out I should register my >>> plugin to which event. Look like the User Entity do not support the >>> SetState Event, and i tried to subscribe to the Update Event, but the >>> plugin just not firing. >>> >>> Hope that someone can give some guidance. >>> >>> Thanks >>> >> >> >