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 :
Dynamics 365 Community / Blogs / Nishant Rana’s Weblog / Configuration Information f...

Configuration Information for Plugin

Nishant Rana Profile Picture Nishant Rana 11,325 Microsoft Employee

Instead of creating a separate .config file for saving configuration info, now we can specify the configuration information for a plugin while we are registering it.

We just need to create a constructer for the plugin class

public class SharingEntity : IPlugin
{

string lscTempId = “”;
string lsuTempId = “”;

public SharingEntity(string unsecureConfiguration, string secureConfiguration)
{
XmlDataDocument doc = new XmlDataDocument();
doc.LoadXml(secureConfiguration);

lscTempId = doc.SelectSingleNode(“//LeadSharingCreate”).InnerText;
lsuTempId = doc.SelectSingleNode(“//LeadSharingUpdate”).InnerText;

………………….

The config info is specified as following
<Config>
<LeadSharingCreate>8a08c5ec-b6cd-dd11-a48d-00164145e126</LeadSharingCreate>
<LeadSharingUpdate>88E6872C-B7CD-DD11-A48D-00164145E126</LeadSharingUpdate>
</Config>

We have put the above info in the Secure Configuration area of the plugin registration dialog box, while registering the Step.

“The unsecureConfiguration is made available to plug-ins invoked both on the server and in the outlook client.The secureConfiguration is more secure and is only passed to the plug-in when it executes on the server. The secure configuration allows you to keep the information from being distributed to client machines that might be less secure.”


Posted in Microsoft Dynamics CRM Tagged: CRM

This was originally posted here.

Comments

*This post is locked for comments