locked
Please provide me information on Plug-Ins RRS feed

  • Question

  • Hello Everybody,
                                    I am new to CRM. I am not able to understand the Image attribute of context in the Plug-Ins and also I am not able to understand the concept of child plug-ins?.

    Could anyone please provide helpful need for me?.


    Thanks,
    Pradeep
    Tuesday, March 31, 2009 5:29 AM

Answers

  • Hi Kumar, 

    Images are easy to understand. Images are snapshots of an entity's attributes at a given moment in time.
    Using the Image attribute you can intarogate the different attributes of the pre or post image.

    Have a look at the code below:

    DynamicEntity Prede = (DynamicEntity)context.PreEntityImages["PreImage"];
    foreach (Property pPre in Prede.Properties)
    {
    if (pPre.Name == "new_additionalownerid")
    {
    Lookup lpUserID = Prede.Properties["new_additionaluserrid"] as Lookup;
    if (lpUserID != null)
    {
    userid = lpUserID.Value.ToString();
    }
    }
    }

    Here I am trying to read the Pre Update value of a custom attribute.

    Mark Kovalcson's blog will help in understanding Pipelines and execution modes.
    http://crmscape.blogspot.com/2009/02/ms-crm-40-plug-in-stages-pipelines-and.html

    Hassan.
    • Edited by Hassan Hussain Tuesday, March 31, 2009 8:22 AM code format
    • Proposed as answer by Hassan Hussain Tuesday, March 31, 2009 8:22 AM
    • Marked as answer by Jim Glass Jr Tuesday, March 31, 2009 5:23 PM
    Tuesday, March 31, 2009 8:21 AM

All replies

  • Hi
        You can find many valuable information in CRM 4.0 SDK and crm blogs. Here are some links:

    http://msdn.microsoft.com/en-us/library/cc151078.aspx
    http://blogs.msdn.com/crm/archive/2008/03/07/developing-plug-ins-for-crm-4-0.aspx
    http://nishantrana.wordpress.com/2008/07/11/preentity-and-postentity-images-in-crm-40/
    everything is a matter of probability...
    Tuesday, March 31, 2009 7:36 AM
  • Hi Kumar, 

    Images are easy to understand. Images are snapshots of an entity's attributes at a given moment in time.
    Using the Image attribute you can intarogate the different attributes of the pre or post image.

    Have a look at the code below:

    DynamicEntity Prede = (DynamicEntity)context.PreEntityImages["PreImage"];
    foreach (Property pPre in Prede.Properties)
    {
    if (pPre.Name == "new_additionalownerid")
    {
    Lookup lpUserID = Prede.Properties["new_additionaluserrid"] as Lookup;
    if (lpUserID != null)
    {
    userid = lpUserID.Value.ToString();
    }
    }
    }

    Here I am trying to read the Pre Update value of a custom attribute.

    Mark Kovalcson's blog will help in understanding Pipelines and execution modes.
    http://crmscape.blogspot.com/2009/02/ms-crm-40-plug-in-stages-pipelines-and.html

    Hassan.
    • Edited by Hassan Hussain Tuesday, March 31, 2009 8:22 AM code format
    • Proposed as answer by Hassan Hussain Tuesday, March 31, 2009 8:22 AM
    • Marked as answer by Jim Glass Jr Tuesday, March 31, 2009 5:23 PM
    Tuesday, March 31, 2009 8:21 AM
  • Thanks buddies for your help...:-)

    Thursday, April 2, 2009 1:37 PM