locked
Plug-In Registration Details RRS feed

  • Question

  • Hi All

    I have a custom entity created. The Lead has 1:N relationship with this custom entity, and also Opportunity has 1:N relationship with this custom entity.

    Now, when I convert a Lead to Opportunity I want these custom entities also to be migrated. In this case what all the parameters need to be considered for registering?

    Stage: Post

    Execution mode: Synchronous

    Pipeline: Child

    Message: Create

    Entity: Opportunity

     

    Thanks

    Monday, June 21, 2010 2:41 PM

Answers

  • You should only go for the child pipeline if you want to register for event that can't be caught in the parent pipeline.

    If you can catch the event on the parent pipeline, there is no reason why you should go for child pipeline.

    Child pipeline is really troublesome as you don't have access to CRMService and imposes few limitations.

    Also keep in mind that if you make any changes to the parent record in the child pipeline, your changes might get overriden by CRM.

    Dimaz

    Monday, June 28, 2010 7:49 AM

All replies

  • 1)Register  an  image on  the  entity,  PreEntityImage

    2) Reterive the  leadid from the image.

    3) use QueryByAttribute to reterive all the custom entities associated with lead

    4) use CrmService.Create() to create the custom entity against  hte opportunity.


    Muhammad Ali Khan
    http://malikhan.wordpress.com
    Monday, June 21, 2010 2:51 PM
  • How i need to register the plugin?
    Wednesday, June 23, 2010 10:44 AM
  • Hi,

    what you mean how?

    Download the plugin registration tool from here. Follow the steps by steps on how to register the plugin. While registring a New Step, make sure you followed the steps i told u above.

    http://code.msdn.microsoft.com/crmplugin

    Here is  a step by step walkthrough of the registration steps.

    http://www.crowehorwath.com/cs/blogs/crm/archive/2009/02/21/crm-4-0-plug-in-registration-tool-walkthrough.aspx


    Muhammad Ali Khan
    http://malikhan.wordpress.com
    Wednesday, June 23, 2010 11:19 AM
  • I mean whether the below points are correct?

    Stage: Post

    Execution mode: Synchronous

    Pipeline: Child

    Message: Create

    Entity: Opportunity

     On the other thread you have said the above points are correct, so considering they are right.

    Wednesday, June 23, 2010 4:14 PM
  • yes  they are,  you can  put the debugger  on  the  plugin  as well and  u will see the debug point being hit.

    If you have any issue, you can always post your  queries here. one more think be-careful about Child Pipeline  ICRMService doesn't work  in  child pipe line as described in the below links. you have to create an  istance  of "CRMService".

    see  here how  to create the object  of CrmService inside plugin.

    http://msdn.microsoft.com/en-us/library/cc151083.aspx

    Also

    http://crmscape.blogspot.com/2009/02/ms-crm-40-plug-in-stages-pipelines-and.html

    The  reamining  code for the  plugin  remains the same.


    Muhammad Ali Khan
    http://malikhan.wordpress.com
    Wednesday, June 23, 2010 4:30 PM
  • Hi Ali,

    I am able to register this plugin in Prent pipeline also, and it is working as expected. Any reason to go for the child pipeline?

     

    And in fact when registering in child pipeline i am getting SQL server error.

    Thanks

    Monday, June 28, 2010 7:29 AM
  • You should only go for the child pipeline if you want to register for event that can't be caught in the parent pipeline.

    If you can catch the event on the parent pipeline, there is no reason why you should go for child pipeline.

    Child pipeline is really troublesome as you don't have access to CRMService and imposes few limitations.

    Also keep in mind that if you make any changes to the parent record in the child pipeline, your changes might get overriden by CRM.

    Dimaz

    Monday, June 28, 2010 7:49 AM
  • Ok, then i will go with parent pipeline.

    Thanks.

    Monday, June 28, 2010 8:27 AM