Solved

CRM 4.0 workflow

Posted on 2008-10-14
10
738 Views
Last Modified: 2012-05-05
Using "or" instead of "and" in workflow

I am trying to say:

If Account:Address 1: State/Province does not equal [NY] or [MA] or [CT],
then:

blah blah blah.

But it seems the condition will only say "and".  I would have also thought I
could use "not in" but it only allows one entry.

If Account:Address 1: State/Province not in [NY]. Can't add any more entries
to this...

Can anyone point me in the right direction?
0
Comment
Question by:simprick
  • 7
  • 3
10 Comments
 
LVL 15

Expert Comment

by:WilyGuy
ID: 22715546
2 ways to do this I think
The Not In is a list, so I just type and separate with comma

So State/Province NOT IN MA, NY, CT

it should save and work as expected.

OTHERWISE, you could cascade some IFs.
If it doesn't equal NY, then the next Condition check is the next state, etc.  basically you drop to the "Else" if none of them are equal.  

I tested the first one (somewhat dirty test) but it worked.

Not great documentation on the NOT IN condition.
0
 
LVL 15

Expert Comment

by:WilyGuy
ID: 22715555
OK, weird, my second test failed (of the first method)

0
 
LVL 15

Expert Comment

by:WilyGuy
ID: 22715773
Alright, so the second method works.

BUT, I also just added each state as a separate Does Not Equal and it created the AND.  Maybe I am confused what you want to do:

MD or PA or DE - do the workflow action
NY or CT or MA - don't do it....

Am I right?
0
 
LVL 15

Expert Comment

by:WilyGuy
ID: 22715796
When I added the three Does Not Equals...I get a (S/P does not equal NY) AND (S/P does not equal CT) AND (S/P does not equal MA)


0
 
LVL 2

Author Comment

by:simprick
ID: 22720122
Thanks WilyGuy.  Here is a little explanation.  States are grouped into sales territories, but not all states just the 17 states we are currently working in.  So I am try to assign leads to the VP of sales if lead is not in one of our currently defined 17 states to determine who to assign the account to.  So I am trying to say (in the most straight forward way)
If Account:Address 1: State/Province does not equal [NY] or [MA] or [CT], (or any of the defined states that are grouped into territories)

then:  Assign lead to VP of Sales (or something to that affect)

I thought of doing the clause for each state but it just seems to be redundant and hard to manage as the states are going to change as the companies grow.  Seems like there should be an easier way to say it.

Thanks
Rick
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 15

Expert Comment

by:WilyGuy
ID: 22721529
So you need to just add each state with its own line, then as the states are pulled into territories, you can add a new line.

Still trying to find the syntax for the "NOT IN" (seems like that should be the condition)
0
 
LVL 2

Author Comment

by:simprick
ID: 22722285
Take a look at the WorkFlow Main pic "Otherwise, if Lead:State/Province does not equal [ny] AND Lead:State/Province does not equal [ct], then:

I would have thought I could change the "AND" into an "OR" and that would make it pretty easy, I would just have 17 OR statements, but having to do that (Create check condition, then go to WorkFlow Condition screen, add the state, the add another condition, ect, takes forever, but I guess that is the way it has to be done.  Are you able to add more than 2 characters to the NOT IN clause?  I can't.

WorkFlow-Main.jpg
WorkFlow-Condition-screen.jpg
0
 
LVL 15

Accepted Solution

by:
WilyGuy earned 250 total points
ID: 22727222
Yours looks fine.

So if there is no State, you assign to someone
Then if there IS a state you are going to check if it is in a territory, so understand:
- you are trying to get the condition to "fail' (if it doesn't equal 1 AND if it doesn't equal 2 AND if it doesn't equal 3 assign it to this person).  So you are "bundling" that in a "If it isn't in our existing territory - do this"

I was able to add multiple characters to the NOT IN clause.  It is funny that all the DOES NOT EQUAL in an advanced find end up as a SQL statement with a NOT IN....  

Still no advancement on the NOT IN....it is not available when using Picklists or Lookup fields.  You CAN add a Dynamic Value there.  not sure what the functionality is supposed to be.  I think you can do a comparison to already established values (dupe checking maybe)

I FINALLY got the NOT IN to do SOMETHING :).  I said if Account:State/Province NOT IN Primary Contact State/Province make the Account main Phone number 5.
I then created a Contact with a State of MD and then created an Account in VA with that as the Primary Contact and sure enough it changed the number.  Then I made another account in MD with that as Primary and it didn't change it.  I feel like it could be useful, but not sure how yet.

Hope that finished answering the question you didn't really ask, while answering the one you did.

0
 
LVL 15

Expert Comment

by:WilyGuy
ID: 22727227
of course, I can also do that with Does Not Equal....sheesh.
0
 
LVL 2

Author Closing Comment

by:simprick
ID: 31505909
Thanks WilyGuy.  I think I liked the workflow in 3.0 better.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a walkthrough guide I wrote whilst upgrading my on-premise MS Dynamics CRM 3.0 deployment to 4.0. This covers the actual installation of the product to a working level for my system, I ran into a lot of issues that the steps below fixed so h…
On Sep 22nd 2014 Microsoft released Update Rollup 1 for Microsoft Dynamics CRM 2013 Service Pack 1 and back in July Update Rollup 3 was released.  So we now have:   Update Rollup 1Update Rollup 2Update Rollup 3Service Pack 1Update Rollup 1 for S…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now