Hi Kumar,
Trust all is fine..
Am having same error log while debugging my plug-in.
What am I doing wrong.
Here is the code below.
//The InputParameters collection contains all the data passed in the message request.
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)
{
//Obtain the target entity from the input parameters.
Entity entity = (Entity)context.InputParameters["Target"];
if (entity.LogicalName != "incident")
return;
IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
try
{
//Plug-in business logic goes here.
if (entity.Contains("isw_issuesubcategory") && context.MessageName == "Create")
if (entity.Attributes.Contains("isw_issuesubcategory"))
{
var value = entity.GetAttributeValue<string>("isw_issuesubcategory");
if (value != "Credit Card Management")
return;
incidentid = entity.Id;
Entity incident = service.Retrieve("incident", incidentid,
new ColumnSet("isw_issuesubcategory", "ticketnumber",
"title", "customerid", "isw_issuecategory",
"isw_issue", "isw_issueproduct", "caseorigincode", "isw_conflictofinteres",
"isw_supportteam", "isw_kblink ", "isw_servicequeue"));
string NgTicketnumber = incident.Attributes["ticketnumber"].ToString();
string NgTitle = incident.Attributes["title"].ToString();
string NgCustomerId = incident.Attributes["customerid"].ToString();
string NgIssuecategory = incident.Attributes["isw_issuecategory"].ToString();
string NgIssue = incident.Attributes["isw_issue"].ToString();
string NgIssueProduct = incident.Attributes["isw_issueproduct"].ToString();
string NgCaseOriginCode = incident.Attributes["caseorigincode"].ToString();
string NgConflictOfInterest = incident.Attributes["isw_conflictofinteres"].ToString();
string NgSupportTeam = incident.Attributes["isw_supportteam"].ToString();
string NgKbLink = incident.Attributes["isw_kblink"].ToString();
string NgServiceQueue = incident.Attributes["isw_servicequeue"].ToString();
string test = "Title";
//Call webservice here
entity.Attributes["isw_disputeplatform"] = "worked";
service.Update(entity);
Thank you