Hi,
I want Opportunity to be lost as Cancelled via a OOB Workflow executed on some condition on Opportunity page, but not manually through clicking 'Close As Lost' ribbon button and selecting Cancelled.
I have written a Plugin which checks for Depth = 1 on SetStateDynamicEntity message name of Opportunity. If found, thrown an Exception to stop user.
Worked fine when manually clicked on ribbon button for losing Opportunity.
But I also found the same exception on OOB Workflow execution on Opportunity.
What can be done now to resolve it.
Thanks,
Arun