HI,
I've registered a plugin on create message post operation.
I want to check for an attribute value just after creation of the record.
my plugin code is something like this:
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)
{
// Obtain the target entity from the input parmameters.
Entity entity = (Entity)context.InputParameters["Target"];
if (context.PrimaryEntityName == "new_case")
{
string status = string.Empty;
status = (string)entity.Attributes["new_status"];
if (status=="Transfer")
{
try
{
// some code here
}
}
}
}
But when I create the record, I get 'The given key is not present in the dictionary' error.
I registered it on post operation, then there should be the value in it right? What am I doing wrong? Someone please guide me.
Thanks.