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)

Type IPlugin is not defined

(0) ShareShare
ReportReport
Posted on by 130

I am Very new to CRM. I am Very new to VB and have been trying for quite some time now to use code that Simon Hutson generously donated to remove the HTML tags from emails.

blogs.msdn.com/.../converting-html-e-mail-to-plain-text.aspx

I have added the code to a project and added a number of references from both the Net and SDK/Bin and when I Build the project this is an error message I receive.

What I understand this message is trying to tell me is that it doesn't know where to find IPlugin but I can't figure out where I should be referencing it from. I thought it was the xrm.sdk but I have these imports at the beginning of my code.

Imports System.ServiceModel

Imports System.ServiceModel.Web

Imports Microsoft.Xrm.Sdk

Imports System.Text.RegularExpressions

The error message is generated at Public Class EditHTML Implements IPlugin and to me it appears to be exactly the same as the what is in the SDK examples.

So ... I am at a loss and would greatly appreciate any assistance.

Cheers

*This post is locked for comments

I have the same question (0)
  • jlattimer Profile Picture
    24,562 on at

    Do you have a reference to 'microsoft.xrm.sdk' under Project Name -> Properties -> References?

  • ALeighton Profile Picture
    130 on at

    Thank you! Yes I do

  • Community Member Profile Picture
    on at

    Please add reference to "microsoft.xrm.sdk" and "microsoft.crm.sdk.proxy.dll"

  • ALeighton Profile Picture
    130 on at

    The reference and Import statement for microsoft.Xrm.Sdk are already in my project. The reference and Import for microsoft.crm.sdk.proxy generates a warning when I recompile my code.

    Warning 2 The referenced assembly "microsoft.crm.sdk.proxy" could not be resolved because it has a dependency on "System.ServiceModel.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. ActivityLibrary1

    However, I have a reference and Import statement for the above mentioned Syste.ServiceModel.Web

    While checking and adding these references I have noticed that not all of the references in my project are the same version. Some are 4.0, 1 is 5.0 and the ServiceModel is one I had to hunt for and is version 3.5

    My current environment is CRM 2011 On Premises with Update Roll-Up 13 Visual Studio 2010 version 0.0.3 and .Net Framework 4.0

    Cheers

  • Community Member Profile Picture
    on at

    Alternative simpler approach would be to install crm developer toolkit, which you'll find from the SDK - sdk\tools\developertoolkit. Then create a new project choosing Dynamics CRM 2011 plugin library as the template. This will do all the background job for you. From the CRM explorer you'd need to right click on the entity and create a plugin.

  • ALeighton Profile Picture
    130 on at

    Once again - thank you but that suggestion is proving easier said than done. I have opened a new Plugin project in the developer toolkit but when entering the parameters of the project (Name, when to execute, alias and parameters) I get an error message telling me "Length cannot be less than zero. Parameter Name: Length"

    From the CRM Explorer I chose the Email as the entity, deliverincoming as the message,  then the Pre-Validation step for when I would like this plugin to execute, chose an alias name and then chose the Description and From as parameters.

    I thought the message may be related to the Email From field so re-entered everything the same but omitting the email From as a parameter. No change

    So I am having a bit of difficulty determining which parameter it's referring to.

  • martijnburger Profile Picture
    250 on at

    It's not refering to a parameter. You need to save the solution first. Strange message, I agree!

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