Currently we have a SalesOrder that can be fulfilled or canceled. We have some logic that will do one thing if it is fulfilled and another when it is canceled. Currently we CAN fire the plugin after it is fulfilled or canceled but we cannot tell which
state it is in. Currently we have the plugin set to fire on the Create message of the OrderClose entity and it is a preoperation. It fires but when we do a retrieve of the related salesorder its state is Active. When we check the state of the orderclose
it state is always complete whether or not it is a fulfill or cancel state. We have tried setting up on the salesorder on the setstate message but that never fires. It does fire after the orderclose but it seems like the salesorder state does not change until
the orderclose is completed and saved successfully. The question is how can we determine whether the salesorder is fulfilled or canceled?
Thanks in Advance