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.
- Create your advanced find, setup your filters etc.
- Save your advanced find (name it something unique)
- 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'
- 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'
- 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.