Tech Support > Microsoft Windows > Windows CRM > Workflow rule based on picklist
Workflow rule based on picklist
Posted by Mikkhail on June 6th, 2005


Please help.
How can I make a rule which selects certain value from picklist depending on
selected opprtunity status (Won, Lost). I can't figure it out how to achieve
this to work properly.

Thanks, M

Posted by Shashi on June 14th, 2005


Try consturcting conditions like
if
opportunity.status = won
then
opportunity.<customfield> = <customfieldvalue>
else if
opporutnity.status = lost
then
opportuntiy .....
end if

regards,
shashi.

"Mikkhail" wrote:

Posted by Mikkhail on June 23rd, 2005


Thanks shashi but I had in mind the opposite way: when I change the
custom.field I want the opportunity.status to change. But the opp status can
be changed anytime not just when opp is created so we have to use wait for
condition.

I just don't know how to do that.
Regards, M


"Shashi" wrote:

Posted by Mikkhail on September 14th, 2005


I guess it is impossible to achieve that.

"Mikkhail" wrote:

Posted by fc3 on September 15th, 2005


not with a rule "create"

"Mikkhail" wrote:

Posted by Dave Carr (dave- no spam-@vscrm.com on September 16th, 2005


Mikkhail,
It is absolutely possible to achieve this with CRM 1.2 workflow. It's
(almost) as easy as A-B-C.

A. Create the manual rule(s).
1. Open Workflow Manager, select Opportunity, select File New.
2. Name the rule (I'll call it A1) and select the MANUAL event.
3. Click on Insert Condition, select Wait for conditions
4. Click on the <<add conditions here>> entry, click on Insert
Condition, Wait object condition.
5. Select the field (for example, actual value), the condition and
value, and click OK.
6. Click on the End wait line.
7. Click on Insert Action, Update object.
8. Select the statuscode field, =, the value (Won, or Out-Sold, etc),
click OK.
9. Click Save.

You will need to add one Rule like this for each value of the custom
field that will affect the Status. (One to update the status to Won,
one to update to Out-Sold, etc.)

B. Create a Manual Rule to invoke all "type A" rules.
So that you can "catch up" with all of your existing opportunities,
create one manual rule that executes all of the "type A" rules above.
To do so:
1. In the Opportunity Workflow Manager window, select File New
2. Name the rule (I'll call it "Invoke Opportunity Rules") and select
the MANUAL event.
3. Click on Insert Action, and select "Run Subprocess".
4. Select one of the "type A" rules you created. (A1), and click OK.

--- Repeat steps 3 and 4 until all "type A" rules are "exec'd" in this
one rule.

5. Click Save.

C: Create the CREATE rule.
Now, to get these Manual rules to fire automatically, you need to
create a rule that will invoke all of them when an opportunity is
created.
1. In the Opportunity Workflow Manager window, select File New
2. Name the rule (I'll call it "Create Opportunity Rules") and select
the CREATE event.
3. Click on Insert Action, and select "Run Subprocess".
4. Select the name of the one "Type B" rule you just created, and click
OK.

Now, back on the Opportunity page, you will see at least 3 rules set to
a status of Inactive. Right click on each rule and select Activate.

D: To "catch up", (make these rules apply to all existing
opportunities)
1. Go into CRM and select the Active Opportunities view.
2. Click on the box below the Actions menu item to select all (100)
opportunities.
3. Select Actions | Apply Rule.
4. Select the Workflow Process button and select the name of the "type
B" rule you created, and click OK.

This will create one manual rule for each opportunity, for each "type
A" rule you created. Because you added that Type C create rule, all
new opportunities created from this point forward will automatically
have these rules created.

Now, one caveat: this will create a huge number of rules that will
remain active (waiting for that condition to be satisfied) until you
upgrade to CRM 3.0. I have noticed some instability with the 1.2
workflow manager when trying to process rule sets of this
sophistication. So you may want to create some queries that test that
the rules are being handled, such as "show me all opps that have a
(custom field value) where the status is NOT (what it should be). You
can then run that particular manual workflow rule to cause that update
to happen on this set. Hope this helps, good luck,

Dave

-------------------------------------------------
David L. Carr, President
Visionary Software Consulting, Inc.
Main #: 971-327-6944

To download a fully functional trial version of VAST, (Visionary Audit
System Tools for Microsoft CRM), that tracks all changes made to the
Adventure Works Cycle database, visit http://www.vscrm.com/trial.htm


Similar Posts