Home > Extensions > Unsupported > SQL > CRM 4.0 – Adding the queue name to a saved advanced find for cases (incidents)

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.

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2011 MSCRM Blogger

This site does not necessarily represent the views of Microsoft. The material posted on this blog are provided AS-IS, and you are to use the content at your own risk. Some of the code and information on this site may use unsupported methods. If you experience any problems using the information provided through this website, please post a comment and we will do our best to assist you, however, we can in no way guarantee support or resolution.

Microsoft Dynamics®, Silverlight®, Visual Studio®, and the corresponding logos are a registered trademarks owned by Microsoft Corporation. MSCRM Blogger has made every effort to supply trademark information about company names, products, and services mentioned on this blog. All third party trademarks are the property of their respective owners. Any rights not expressly granted herein are reserved.