I am working with booking transactions where I have multiple status
I am using statecode and statuscode to accomplish it
The plugin is triggered on Activate and Deactivate Record
But I am unable to access the Status Reason selected for Activation or Deactivation
My further processing is dependent on status reason received
here is the code sample I am using for plugin
if (context.InputParameters.Contains("EntityMoniker") &&
context.InputParameters["EntityMoniker"] is EntityReference)
{
EntityReference entity = (EntityReference)context.InputParameters["EntityMoniker"];
var state = (OptionSetValue)context.InputParameters["State"];
var status = (OptionSetValue)context.InputParameters["Status"];
if (entity.LogicalName != "psm_quote")
return;
// code for further processing
}
While debugging I am getting state Value as 0
and status value as -1
please guide me how to get selected value of status reason
Thanks in advance






