I have a plugin that is triggered when an order is fulfilled or cancelled and is registered on synchronous pre-create of the orderclose entity.
I need the logic to behave differently if the order is being fulfilled or cancelled but I don't have access to this on the order close and retrieving the order entity only gives me the status the order is moving from.
Including this: tracer.Trace(targetEntity["statecode"].ToString());
Gives me an error "Given Key is not in Dictionary".
Running this:
foreach(KeyValuePair<string,object> a in targetEntity.Attributes)
{
tracer.Trace(a.Key + ": " + a.Value.ToString());
}
Gives me this:
timezoneruleversionnumber: 0
activityid: 47615cb0-1317-e811-8117-5065f38a4a41
description: test
owningbusinessunit: Microsoft.Xrm.Sdk.EntityReference
modifiedon: 2/21/2018 2:30:04 PM
How can I detect whether the order is being cancelled or fulfilled?
*This post is locked for comments
I have the same question (0)