Plugin customization from crm 4.0 to crm 2013 RRS feed

  • Question

  • Hi,

    can anyone advice or help me to customize CRM 4.0 plugin code where using Product class, to CRM 2013.

    There is not product class (crm service) in CRM 2013 and I don't know how to customize below Code to CRm 2013 plugin

    here i attached snip of CRm 4.0 plugin code

     try {
                                Log("Neue Vorlage!");
                                Entity vorlage = (Entity)context.PostEntityImages["Vorlage"];
                                //Entity product = new Entity[4];
                                product[] produkte = new product[4];

    Tuesday, March 3, 2015 3:27 PM

All replies

  • Hello,

    You can go 2 ways:

    1. Use Late Binding and your code could look like

    Entity[] produkte = new Entity[4];

    2. You can use Early Binding.

    And after that your code could look like:

    Product[] produkte = new Product[4];

    Dynamics CRM MVP
    My blog

    Tuesday, March 3, 2015 3:55 PM
  • With CRM 2011andCRM 2013,it is easy to convert all the entities to Entity, back and forth. There is no need to convert them into specific types.Consider entity like an object in c#. So your code will be like

    Entity[] produkte = new Entity[4]; // or like List<Entity> produkte = new List<Entity>();


    Tuesday, March 3, 2015 9:49 PM