locked
custom attributes not appearing in plug-in RRS feed

  • Question

  • Hi
    I have a plugin on CRM 4.0. It is to be a simple copy of specific fields on a lead to an opportunity when a lead is converting to an opportunity and account.
    I have create the plugin for create of an opportunity. I have about 6 custom fields on the lead that are also on the opportunity. However, when the Plug-in kicks in; The target opportunity in the Input parameters only has 22 properties on it. None of which are my custom properties.
    I am using the Plugin deployment tool with the SDK. I told it to register the pre-event for create of opportunity in Child pipeline.
     
    My code is like this:

    Microsoft.Crm.Sdk.

    DynamicEntity target = (Microsoft.Crm.Sdk.DynamicEntity)context.InputParameters[Microsoft.Crm.Sdk.ParameterName.Target];

    Then when accessing the target.Properties["new_???"]; I get the error that it is not in the collection...I would have expected all my custom attributes would be there.

    Am I missing something to get my custom attributes to appear in the DynamicEntities Property collection? Do I need to register the event differently?

    Thanks.
    Monday, September 14, 2009 8:46 PM

Answers

  • Hi.

    Have you set up mapping for those custom fields between lead and opportunity?
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by rd_bigdog Tuesday, September 15, 2009 1:01 PM
    Monday, September 14, 2009 9:00 PM
    Moderator

All replies

  • Hi.

    Have you set up mapping for those custom fields between lead and opportunity?
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    • Marked as answer by rd_bigdog Tuesday, September 15, 2009 1:01 PM
    Monday, September 14, 2009 9:00 PM
    Moderator
  • Thank you...I totally missed that!! It actually very much simplifies the plugin...as I don't really need it anymore...

    Tuesday, September 15, 2009 1:01 PM