Showing posts with label Advanced Find. Show all posts
Showing posts with label Advanced Find. Show all posts

Sunday, April 10, 2016

Build Custom Search using Dynamics CRM System Views

Dynamics CRM users have many options to search CRM data. They include Quick Find, Global (multi-entity) search and (my favorite) Advanced Find.
Advanced Find provides CRM users with a powerful tool to search for information they are looking for using flexible ways to filter, view and sort data. They can also search data across multiple entities such as account and opportunity in the same search.
However, from my experience, some CRM users find Advanced Find confusing and difficult to use especially when they have to search across entities because it requires some knowledge of entity relationships.
System Admins and Customizers can solve this problem by creating System Views with filters using placeholders. CRM users can use these views as a starting point, fill in some or all of the placeholders with known values to find what they are looking for.
Consider the following scenario. Inside Sales department users often need to find a prospect with opportunity that was created recently. However, they may or may not remember the exact name of the account, the exact date when the opportunity was created and the exact estimated revenue. However, they typically know the approximate timeframe when the opportunity was created and the approximate amount of the opportunity. They usually remember the State/Province where the customer is located.
We created the System View with the following filter criteria for the users.


Note the placeholders for Account Name, State/Province, Opportunity Created On and Est. Revenue. Inside Sales users can use this view as a starting point, fill in the values they know or remember and find the Account they are looking for.
They will use the following steps to perform the search.
  1. Navigate to Account entity
  2. Click on Advanced Find button on the top ribbon

  3. Select the appropriate system view created for searching

  4. Fill in the values they know or remember and click Results. Note that they do not need to fill in all the fields but only the ones they know or remember.
  5. CRM returns the following result based on filter criteria.


Depending on the search requirements of the users, you may have to create multiple system views for the same entity and name them appropriately so that users can select the correct view for searching. For example, some users may also need an ability to search for the customer based on a Quote created recently.

This approach makes searching easier and consistent for end users and eliminates the need for in-depth knowledge of Advanced Find and understanding of entity relationships.

Saturday, August 22, 2015

Storing and Querying Age in Dynamics CRM

In the previous post, I discussed how we can use North52 Formula Manager to calculate age in Dynamics CRM.

In a recent implementation, we needed to store a running age of each contact in years and months in CRM. Users also needed an ability to query contacts based on the age including an ability to search contacts using the age range. For example, find all contacts with ages between 1 year and 9 months and 2 years and 9 months. Of course, they wanted to be able to do this intuitively. They wanted to be able to enter 1 year and 9 months using the numbers 1 (year) and 9 (months) rather than 1.75 because this would require users to calculate the fraction in their head before doing the search. Also, some of the fractions would be difficult to calculate mentally. For example, 7 months would be equal to 0.583333 (years).
We cannot store the age value in two different fields i.e. years and months because this would prevent users from using ranges i.e. > and < operators in the Advanced Find query or in the System View.
For example, the following query will return incorrect results:
Age_Years >= 1 AND
Age_Months >= 9 AND
Age_Years <= 2 AND
Age_Months <= 9
We addressed this problem by storing the age values as a decimal number with 2 decimals. The whole number represents years and the fraction represents months. For example, 1 year and 1 month is stored as 1.01, 1 year and 10 months is stored as 1.10 and 2 years is stored as 2.00. This is both intuitive to the users in terms of how they think (in years and months rather than fractions) and also enables users to create Advanced Find queries and views based on the age range. Now, they can easily use the following filter criteria to query all contacts between the ages of 1 year and 9 months and 2 years and 9 months:
Age >= 1.09 AND
Age <= 2.09