Home > Dynamics CRM > CRM 4.0 – Plug-in Configuration Data

CRM 4.0 – Plug-in Configuration Data

I found this article on the CRM Team Blog today and it covered off some interesting questions for Plug-in (callouts for CRM 3.0) development.
In CRM 3.0 we had .dll’s which we would register to the events in the callout.config and along side the .dll we had the ability to have a dll.config file to store the application configuration type information. But … with CRM 4.0 we register the dll’s directly inside the database so we don’t have the ability to have a dll.config for our configuration data which would be used by the Plug-in.
Question 5 on the CRM Team Blog article made reference to solving the configuration issue with Plug-ins which is quite interesting.

5. How do I pass configuration data to plug-in? I don’t see support for app.config

  • Hard coding connections, customer configuration in plug-in is always a bad idea. So if you need some information, either you had to read from Registry or from a File. Multi Server deployment is major problem in either of these cases. So wouldn’t it be nice if CRM provided some functionality to store the configuration data to the plug-in just like it stores the assemblies in database? Well, you have it in the form of SdkMessageProcessingStep.configuration and SecureConfiguration properties. Both of these properties are strings. They can be set when registering the Step and their values are available in the plug-in constructor at runtime.
  • SdkMessageProcessingStep is an OrgOwned entity, so any user in CRM can read the values from this entity via SDK. So data stored in it is not restricted to administrators only.
  • On the other hand, SecureConfiguration can only be read by CRM Administrators. So if you want to store username, pass word information, etc., save it in this property.
  • For a sample look at SamplePlugins.LogContextToCRM in the downloads section

Information and other questions can be found here:

Greg Olsen
Yellow Duck Guy

Categories: Dynamics CRM
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: