locked
Opportunity Workflow to close opportunity as won when choosing 100% probability RRS feed

  • Question

  • Hello,

    I'm trying to build a custom workflow for opportunities that when a user chooses 100% probability, the opportunity automatically closes as 'Won'.  Instead of having the users open the opportunity, choose actions, and then closing it this way.  I've spent a day building this, and everything seems to be set up correctly but it is not running.

    Has anyone ever built this workflow or a similar workflow that could shed some insight?  Can this even be done?  Or does CRM require you to physically close an opportunity as won or lost?

    Thursday, May 10, 2012 3:31 PM

Answers

  • Workflows run asynchronous, so the order in which they execute is actually undefined if for example two workflows are registered on the same event.

    What you need to do if you need to order them is to trigger only the first workflow automatically, and then the second workflow, just mark it as "child workflow", remove the automatic triggers and then you can explicitely start the second workflow (child workflow) from the first one, using a "Start Workflow Step".


    Gonzalo | gonzaloruizcrm.blogspot.com

    Monday, May 14, 2012 1:28 PM
    Moderator

All replies

  • you need to define your workflow to trigger when the field "probability" is updated. Make the scope to "Organization".

    Then inside the workflow steps, add a "Change Record Status" step to set the opportunity as won if the probability is 100% (using a check condition step)

    That should work.


    Gonzalo | gonzaloruizcrm.blogspot.com

    Thursday, May 10, 2012 3:40 PM
    Moderator
  • Thanks Gonzalo, I'll give that a try
    Thursday, May 10, 2012 3:49 PM
  • Hi Gonzalo,

    I tried building the workflow again and still nothing.  It's calling that 'If Opportunity Probability equals 100, then Change record status to Won'

    But the Opportunity still shows up in Open Opportunities.  I have it set to run the auto workflow also

    When I check the workflow for the particular Opportunity, it says workflow succeeded.  But still sitting in Open Status

    Thursday, May 10, 2012 6:18 PM
  • It's set to fire once the number 100 is entered into the probability field, and change the status record to Won.  The workflow runs and says succeeded, but the opportunity is still sitting in open status
    Thursday, May 10, 2012 6:35 PM
  • Post a screenshot of the workflow seen from the opportunity. My guess is that it has not run fully.

    Open the opportunity.

    Click workflows

    Open the workflow

    Screenshot it and post it in here.


    Rune Daub Senior Consultant - Dynateam CRM http://www.xrmmanagement.com

    Thursday, May 10, 2012 7:13 PM
  • Here you go, it says succeeded though

    Thursday, May 10, 2012 7:48 PM
  • That looks like a bug if you are actually setting the probability field to 100.

    I'm wondering whether it would work if you change your condition to "Greater or equal" instead of "Equal"


    Gonzalo | gonzaloruizcrm.blogspot.com

    Thursday, May 10, 2012 8:25 PM
    Moderator
  • What I see in the above screenshot is that the workflow has triggered just fine, but it did not enter the IF statement correctly. If the IF statement had find the statement to be true it should have set a green checkbox next to the update step as well. Since it has not done so, this means that the IF statement was passed with a false value.

    I only see 1 reason for this to happen.

    Make 100% certain that the value that you update (probability) is the field on the form that you are updating. The workflow is so simple that there should be no issues regarding this.


    Rune Daub Senior Consultant - Dynateam CRM http://www.xrmmanagement.com

    Thursday, May 10, 2012 8:56 PM
  • Thanks everyone for the input.  I was able to figure out why the workflow was erroring out.  Basically, there was a subsequent workflow that was built that pushes lookup data to a text field.  And in order for the workflow to run successfully the text field needs to contain data.


    With that being said, is there a way to order workflows?  So basically tell which workflow to fire first?

    Friday, May 11, 2012 6:18 PM
  • Workflows run asynchronous, so the order in which they execute is actually undefined if for example two workflows are registered on the same event.

    What you need to do if you need to order them is to trigger only the first workflow automatically, and then the second workflow, just mark it as "child workflow", remove the automatic triggers and then you can explicitely start the second workflow (child workflow) from the first one, using a "Start Workflow Step".


    Gonzalo | gonzaloruizcrm.blogspot.com

    Monday, May 14, 2012 1:28 PM
    Moderator