locked
ParameterName.Id Conversion to MS CRM 2011 RRS feed

  • Question

  • Code below is to get the guid of the current entity through Plugin.

    How to do the same but in MS CRM 2011 Format

    Guid Id = new Guid(context.OutputParameters[ParameterName.Id].ToString());


    hussain

    Saturday, January 26, 2013 9:26 PM

Answers

  • Hello Hussain,

    In CRM 2011 format I would do it like this:

    Entity entity = (Entity)context.InputParameters["Target"];
    Guid Id = (Guid)entity["accountid"];

    Regards


    Rickard Norström Developer CRM-Konsulterna
    http://www.crmkonsulterna.se
    Swedish Dynamics CRM Forum: http://www.crmforum.se
    My Blog: http://rickardnorstrom.blogspot.se

    Saturday, January 26, 2013 10:39 PM
  • Hi,

    use like as below:

    Entity entity = (Entity)context.InputParameters["Target"];

    Guid Id=entity.Id;


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

    Sunday, January 27, 2013 4:57 AM

All replies