Asked by:
UnSecure Configuration

Question
-
Hi
I am trying to read unsecure configuration provided at Plug-in registration time using below code. I am getting "null" everytime for 'unSecure' in constructor. Is it something I am doing wrong?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.Serialization;
using Microsoft.Crm.Sdk;
using Microsoft.Xrm.Sdk;
namespace ClassLibrary1
{
public class Class1 :IPlugin
{
private string _sUnsecure = string.Empty;
public Class1(string unSecure)
{
if(!string.IsNullOrEmpty(unSecure))
{
}
}
public void Execute(IServiceProvider serviceProvider)
{
}
}
}
- Edited by myCRMGuy Friday, November 1, 2013 4:32 AM
Friday, November 1, 2013 4:31 AM
All replies
-
Check out this example:
http://gonzaloruizcrm.blogspot.com/2011/09/adding-configuration-to-plugins-in-crm.html
Jason Lattimer
My Blog - Follow me on Twitter - LinkedIn- Proposed as answer by JLattimerMVP, Moderator Friday, November 1, 2013 12:54 PM
Friday, November 1, 2013 12:53 PMModerator -
I have tried the same steps but it is coming null when I am debugging using Profiler. I am trying this on CRM 2013 online.Friday, November 1, 2013 1:37 PM
-
I verified it through unSecure Configuration tab on Replay Plugin Execution and values are there. See below screen shot.
Friday, November 1, 2013 1:55 PM -
Hi all.
Just to close this question, I want to say that this was a problem with the Plugin Registration Tool, which was present until May's SDK. In latest SDK from September this works like a charm!!!
Thanks.
Dynamics CRM Certified Consultant (MB2-631,632,633)
Thursday, September 25, 2014 4:34 PM