By default, Microsoft Dynamics CRM applies AND logic to queries that include two or more search criteria. This means that results are limited to those records that meet all search criteria in the query. However, you also might be required to produce a report with records that match any of the search criteria. In this instance, you could use OR logic in Advanced Find to search multiple fields to find records that have matching data in any of the fields.
In this exercise, you will use the Group AND and Group OR functionality of the Advanced Find tool. As you saw earlier, the original criteria we applied to the Hot Opportunities In Chicago Market saved view included all opportunities that met the following criteria:
The opportunity probability is greater than 50.
The accounts are in the city of Chicago.
Now you will expand the criteria to include opportunities in Des Moines in addition to those in Chicago.
USE your own Microsoft Dynamics CRM installation in place of the Adventure Works Cycle site shown in this exercise.
BE SURE TO use the Internet Explorer Web browser to navigate to your Microsoft Dynamics CRM Web site, if necessary, before beginning this exercise.
Launch Advanced Find if it is not open already.
In the Advanced Find query screen, in the Look for field, select Opportunities, and then select Hot Opportunities in Chicago Market in the Use Saved View list.
The criteria for the saved query is displayed.
Click the Show Details button.
By default, the Advanced Find mode is set to Simple, which means that the details of the query are not shown until you click the Show Details button. You can change this setting on the General tab in the Personal Options area, which is accessible from the Tools menu on the application menu toolbar.
In the Potential Customer (Account) section, click the Select field underneath the row that specifies the city as Chicago.
In the Select field, choose Address 1: City.
In the Enter Value field, enter Des Moines.
Because Microsoft Dynamics CRM uses AND logic by default, if you click Find at this point, your search will not return any results, because no single account record can have a primary address in both Chicago and Des Moines.
Click the arrow to the left of the first Address 1: City field, and click Select Row.
Click the arrow to the left of the second Address 1: City field, and click Select Row.
On the toolbar, click the Group OR button.
This selection will update the logic so that records that have a primary address in the city of Chicago or Des Moines will be returned in the results.
Click Find to see the results matching your new query.
3.145.96.224