Feb 182010

Unfortunately, CRM 4.0 does not currently support adding the queue to a case advanced find. However, that doesn’t mean it can’t be done.

Please note, that this is not a supported modification or change.

Follow the steps below to modify your fetchXML and your layoutXML to have the queue name show up in the advanced find. You can even update the name in the UserQueryBase to rename your advanced find to something better.

  1. Create your advanced find, setup your filters etc.
  2. Save your advanced find (name it something unique)
  3. Get the guid of your advanced find (using open pop-ups in a new tab or using a select statement to look it up in the db.
    SELECT UserQueryID FROM UserQueryBase WHERE Name='Cases (w/Queue Name) - IT Example'
  4. Then using the id, execute the following code to add the queue name:
    UPDATE UserQueryBase SET
    FetchXml = REPLACE(FetchXml,'</entity>',
    '<link-entity name="queueitem" from="objectid" to="incidentid" visible="false" link-type="outer" alias="qi">
    <link-entity name="queue" from="queueid" to="queueid" visible="false" link-type="outer" alias="Q">
    <attribute name="name"/></link-entity></link-entity></entity>')
    ,LayoutXML = REPLACE(LayoutXml,'</row>',
    '<cell name="Q.name" width="200" disableSorting="0"/></row>')
    -- Make sure to change the UserQueryID
    WHERE UserQueryID='71F94C46-F217-DF11-A241-0050569B4FF3'
  5. If you have your advanced find window open, close and reopen it before trying to run it and see the "Q.name" column.

If you have any problems or questions, let me know. Again this is setup to work on advanced find for cases, I’m sure it could be modified for other queue-able entities.

With CRM 2011, you can include fields from related entities, so you don’t have to use this method, you can just add the column through the user-interface.

Jun 152009

By default, CRM’s quick find, the find you use on any of the standard search pages, does not let you find inactive items. In December on Jim Wang’s blog, he talked about how to change it so that you can find inactive items, but that doesn’t always help. Maybe you want something a little more detailed like not finding any item that has a specific state type or stage specification, etc.

After some further searching I found another blog by Delta-N, a CRM Gold Partner in the Netherlands. Delta-N had two techniques specified on their blog entry.

I was able to use Delta-N’s option 2 to enable editing of the Case Filter and specify the filter to be a status of Active or Resolved instead of just Active. I don’t care about Cancelled cases (because we only cancel them if they were opened in error).

How I modified the Quick Find for Active Cases
Using the method from Delta-N’s blog to edit the Default Filter on a Quick Find…

  1. Use Microsoft SQL Server Management Studio to enable editing the Saved Query
    UPDATE [SavedQueryBase]
       SET IsCustomizable = 1
     WHERE Name = 'Quick Find Active Cases'
  2. Open CRM and go to Customization, then the entity (In my case it was Case)
  3. Open the QuickFind view
  4. Click “Edit Filter Criteria,” edit, and save
  5. Save and close the View
  6. Save, then Publish the entity