locked
How to fire a plugin on assign a record in mscrm 2011 RRS feed

  • Question

  • Dear all;

    how to fire a plugin on assiging the reocrd to another user is there example for a plguin fireing on assiging the recor din mscrm 2011 

    Monday, June 3, 2013 12:44 PM

All replies

  • You could use Assign message.

    check the following links

    http://danielcai.blogspot.in/2010/02/use-crm-assign-message.html

    http://srikanthakondi.wordpress.com/2012/11/06/crm-2011-plugin-to-assign-a-record/


    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    Monday, June 3, 2013 1:05 PM
  • Hi vikram;

    first of all i am looking for code for mscrm 2011 secondly, i am registering this plugin to assign but i think the i dont know what shoudl be the context in putparameter to get the entity ??? any idea right now i am using target 

    Monday, June 3, 2013 1:58 PM
  • When you registered the Plug-In to the assign message you would have had to tell it the Primary entity your were wishing to monitor. This will be the entity within the Target object returned, unless you kept it generic (respond to an assign for any entity).

    One thing I would suggest is switch on the debugger by attaching the Plug-In code to the web service and/or asynch service. That way you can step into the code when the Plug-In fires and then you can trawl through the object model to see what data is available to you.

    Regards

    Steve

    Monday, June 3, 2013 2:32 PM
  • To identify the record that's being assigned, you should be able to use the context.PrimaryEntityId property.

    The owner to which the record is assigned is probably passed as the Assignee InputParameter, which is of type EntityReference


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, June 3, 2013 2:47 PM
    Moderator