Retrieving a list of CRM Queues

On June 18, 2007, in Customization, Dynamics CRM, by Mitch Milam

As I'm putting the finishing touches on my first commercial CRM Utility, I found the need to obtain a list of CRM Queues so that the user can select one from a combo box, like this:

image

When working with queues, you need to know two things:

1) The Queue Name ( for the user to see ).

2) The Queue ID ( for the CRM system to reference ).

Both of which can be returned by performing a query against the CRM web service.

 

The following .NET method will return just such a list:

   1: private ArrayList GetQueueNames(CrmService myCRMService)
   2: {
   3:     string fetchString =
   4:         "<fetch version=\"1.0\" "+
   5:         "output-format=\"xml-platform\" "+ 
   6:         "mapping=\"logical\" distinct=\"false\">" +
   7:         "<entity name=\"queue\">"+
   8:         "<attribute name=\"name\"/>"+
   9:         "<attribute name=\"emailaddress\"/>"+
  10:         "<attribute name=\"businessunitid\"/>"+
  11:         "<attribute name=\"queueid\"/>"+
  12:         "<order attribute=\"name\" descending=\"false\"/>"+
  13:         "<filter type=\"and\">"+
  14:         "<condition attribute=\"name\" operator=\"not-null\"/>"+
  15:         "</filter></entity></fetch>";
  16:  
  17:     XmlDocument xmlDoc = new XmlDocument();
  18:     xmlDoc.LoadXml(myCRMService.Fetch(fetchString));
  19:     XmlNode node = xmlDoc.SelectSingleNode("resultset");
  20:  
  21:     ArrayList queueList = new ArrayList();
  22:     string n1 = string.Empty;
  23:     string n2 = string.Empty;
  24:  
  25:     foreach (XmlNode n in node.ChildNodes)
  26:     {
  27:         n1 = n.SelectSingleNode("name").InnerText.ToString();
  28:         n2 = n.SelectSingleNode("queueid").InnerText.ToString();
  29:         queueList.Add(new ItemData(n2, n1));
  30:     }
  31:  
  32:     return queueList;
  33: }

 

I created the FetchXML query by following Ronald Lemmen's article on pulling it from the Advanced Find query, which looked like this:

image

 

Populating the Combo Box

In order to use the data within a combo box, I had to create a data structure to hold the data.  Add this class to your application:

   1: public class ItemData
   2: {
   3:  
   4:     private string m_Value;
   5:     private string m_Description;
   6:  
   7:     public object Value 
   8:     {
   9:         get { return m_Value; }
  10:     }
  11:  
  12:     public string Description 
  13:     {
  14:         get { return m_Description; }
  15:     }
  16:  
  17:     public ItemData(string NewValue, string NewDescription)
  18:     {
  19:         m_Value = NewValue;
  20:         m_Description = NewDescription;
  21:     }
  22:  
  23:     public override string ToString()
  24:     {
  25:         return m_Description;
  26:     }
  27:  
  28: }

 

and use this code to actually populate your combo box:

   1:  
   2: ArrayList queueList = GetQueueNames(myCRMService);
   3:  
   4: if (queueList.Count > 0)
   5: {
   6:     cboQueues.DataSource = queueList;
   7:     cboQueues.DisplayMember = "Description";
   8:     cboQueues.ValueMember = "Value";
   9:  
  10: }

 

I think the same code will work to fill a list box, but I haven't tested it.

 

My Guest Post on the Dynamics CRM Team Blog

On June 18, 2007, in Dynamics CRM, by Mitch Milam

Greetings Everyone,

I was asked to be one of this month's guest contributors on the Dynamics CRM Team blog.  You may find the article here.

This is really cool and a great way to start off the week.

Later, Mitch

 

Dynamics CRM 3.0 Implementation Strategies

On June 18, 2007, in Dynamics CRM, by Mitch Milam

I'm sure that many of you have heard the old African proverb:

How do you eat an elephant? One bite at a time.

Consider treating the design and implementation of Dynamics CRM with that exact phrase in mind.

In my previous article on driving user adoption, I discussed several issues that I have run up against implementing CRM.  We'll continue that discussion today with a focus on the implementation phase of CRM.

 

Strategy #1: Take Small Steps

Dynamics CRM can be quite overwhelming to new users because of the sheer amount of functionality in the product.

Since CRM is modular, break up your implementation into related phases:

1) Sales

2) Marketing

3) Service

Completely implement one phase before beginning the next.

 

Strategy #2: Training, Training, Training

Instead of sticking your people in a room for a week, consider breaking the training up in to "mini-sessions" that occupy a small block of time ( like a couple of hours ), and make the training topical and related to the current stage of the implementation.  For example, let's take the Sales implementation phase.   You could create a training session that covered the following topics:

1) Working with Leads

2) Converting a Lead into an Account and Contact

3) Working with Accounts

4) Working with Contacts

5) Tracking activities and the interaction with customers.

Again, the idea is to give the new CRM user enough material to allow them to understand the topics relevant to the CRM functions they are using while ( hopefully ) not overwhelming them with too much information.

If possible, it is also helpful to limit the number of students to four of five to keep the interaction high and the disruption low.

 

Strategy #3: Periodic Reviews

We have found that when you first install CRM, users ( and their management ) don't know enough about the Dynamics CRM system to be able to actually answer certain questions that you may ask.  Like, "What information do you need to see on the Active Contacts View?"

If you give users 3-4 weeks to use the system, you will start to hear questions that begin with: "Can we," "What if", "How about?" 

For example, "Can we add the Contact's street address and phone number to this view so I can print it off before I leave town to visit those customers?"

The same thing applies to adding custom fields to forms, creating custom workflows, reports, etc.

Having a built-in review once per month for 3-4 months after the implementation works pretty well.

 

In Conclusion:

I hope this discussion has gotten you to think about your current or next CRM implementation.  You can easily build on these strategies to incorporate your own procedures and processes to make the system work for you.