Configuration Information for Plugin
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.

Like
Report
*This post is locked for comments