Can I restrict the ablity to reopen a "closed as won" opportunity? RRS feed

  • Question

  • I am looking into a way to restrict employees from reopening a closed as won opportunity in CRM. Am I able to do this? if so, how?

    JC IHC

    • Edited by JC IHC Monday, March 9, 2015 7:29 PM
    Monday, March 9, 2015 7:28 PM

All replies

  • I expect you could do this with a plugin on the pre-event stage of the SetState message of the Opportunity entity. Check the current state, an if it's won, and the user is trying to set the state to open, then throw an InvalidPluginExecutionException to cancel the action

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, March 9, 2015 8:49 PM
  • Thank you for the reply, but I am not following you.

    JC IHC

    Tuesday, March 10, 2015 4:11 PM
  • The only way to do this is write code as a plugin. The Crm SDK gives information about plugins and how to write them. My previous post gave specifics on the entity, message and stage that you'd need to register the plugin on

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, March 10, 2015 7:31 PM
  • Hi JC IHC,

    The above suggestion should work just fine. However, if you are not familiar with the CRM SDK/ developing plugins, you can do this in a simpler way.

    Assuming your version of CRM is 2013/2015, you can create a Workflow that runs synchronously, and implement some logic in it.

    Some basic steps: Create workflow that Triggers on status change of Opportunity (Sync Workflow) - Set some logic to validate whether the status is Won - Stop the workflow with Status "Cancelled" and go into Properties to define which message you'd like to trigger (Example: "Won Opportunities cannot be reopened"); One small important detail is that you need to set the workflow to "Start When: " Before, and not After (default option in the workflow wizard). - So that it actually triggers before the update, and not after.

    There you go, simple way to set this up without the need to code at all.

    Let me know if that worked out for you,

    Hope that was helpful,

    Tuesday, March 10, 2015 11:28 PM
  • One way would be to use a tool like Ribbon Workbench to hide the Reopen opportunity button

    Regards, Saad

    Wednesday, March 11, 2015 7:27 AM