locked
Trigger a plugin in Pre event pipeline when User's BU changed. RRS feed

  • Question

  • Hi.,

    I want to trigger a plugin to do some validation when the System Admin changes the User's business unit. what is the correct message which I can use to trigger the plugin in (Pre Operation in Event pipeline).

    Thnaks !


    SAFI

    Tuesday, June 18, 2013 4:38 AM

Answers

  • hi All,

     I have completed this with little bit of unsupported customization. What i did was,  i have enabled the platform tracing to check what message is firing when the business unit changes and the trace shows that it is 'SetBusiness'. We can't find this message in the plugin Registration tool as this method is not exposed for customization. 

    So, i have updated SdkMessageFilter table to expose the 'SetBusiness' message then i am able to trigger my plugin with that event. 

    hope this will help somebody when the face similar requirement.


    SAFI

    Wednesday, June 19, 2013 6:34 AM

All replies

  • Hi,

    You can use update message on the systemuser entity.

    Tuesday, June 18, 2013 6:10 AM
  • Hi Suresh,

    update message may not be the correct message for this scenario. CRM internally executing some calls before it triggers the SystemUser update. so, i want to trigger my action before SystemUser message update. 

    Here is my scenario:

    When SA changes the businessunit, CRM internally removing the security role of the user and changes the business unit. I want to do some validation via plugin(or some other way) before CRM removes the security role. Any suggestions?



    SAFI

    Tuesday, June 18, 2013 7:04 AM
  • hi All,

     I have completed this with little bit of unsupported customization. What i did was,  i have enabled the platform tracing to check what message is firing when the business unit changes and the trace shows that it is 'SetBusiness'. We can't find this message in the plugin Registration tool as this method is not exposed for customization. 

    So, i have updated SdkMessageFilter table to expose the 'SetBusiness' message then i am able to trigger my plugin with that event. 

    hope this will help somebody when the face similar requirement.


    SAFI

    Wednesday, June 19, 2013 6:34 AM