web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to use PreEntityImage and PostEntityImages in Plugins in CRM 5.0. I am not getting the syntax of using it . The syntax has changed from CRM 4.0.

(0) ShareShare
ReportReport
Posted on by 100

How to use PreEntityImage and PostEntityImages in Plugins in CRM 5.0. I am not getting the syntax of using it .

How to get the form attributes values like lookup ,picklist ,boolean values etc. The syntax has changed in crm 2011 and they are using a collection for retrieving the attributes. I am not able to get the syntax for using  in the plugin. Please help me in getting the correct syntax in the code.

 

 

 

 

 

*This post is locked for comments

I have the same question (0)
  • Sumedha Obeysekera Profile Picture
    307 on at

    try this code pl..

    www.sumedha8.blogspot.com.au/.../sample-plug-in-compare-pre-and-post.html

  • Community Member Profile Picture
    on at

    Suppose you registered the Plugin and added a Image with name “PreImage ”

    Entity preMessageImage;

    if (context.PreEntityImages.Contains(“PreImage”) && context.PreEntityImages["PreImage"] is Entity)

    {

    preMessageImage = (Entity)context.PreEntityImages["PreImage"];

    accountnumber = (String)preMessageImage.Attributes["accountnumber"];

    }

    Suppose you registered the Plugin and added a Image with name “PostImage ”

    Entity postMessageImage;

    if (context.PostEntityImages.Contains(“PostImage”) && context.PostEntityImages["PostImage"] is Entity)

    {

    postMessageImage = (Entity)context.PostEntityImages["PostImage"];

    accountnumber = (String)postMessageImage.Attributes["accountnumber"];

    }

  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    The Dynamics CRM really is your best resource for this - it has great content if you have the patience to read it and the samples are 1st class.

    For a general explanation see msdn.microsoft.com/.../gg309673.aspx

    Then download the sdk (www.microsoft.com/.../details.aspx) and look at the AdvancedPlugin.cs sample for syntax on using images at:

    SDK\SampleCode\CS\Plug-ins

    Hope this helps,

    Scott

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans