Home > MS CRM 4.0 > Adding the queue name to a saved advanced find for cases

Adding the queue name to a saved advanced find for cases

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.
    1. SELECT UserQueryID FROM UserQueryBase WHERE Name=’Cases (w/Queue Name) – IT Example’  
    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:
    1. UPDATE UserQueryBase SET  
    2. FetchXml = REPLACE(FetchXml,'</entity>’,   
    3. ‘<link-entity name=”queueitem” from=”objectid” to=”incidentid” visible=”false” link-type=”outer” alias=”qi”>  
    4. <link-entity name=”queue” from=”queueid” to=”queueid” visible=”false” link-type=”outer” alias=”Q”>  
    5. <attribute name=”name”/></link-entity></link-entity></entity>’)   
    6. ,LayoutXML = REPLACE(LayoutXml,'</row>’,   
    7. ‘<cell name=”Q.name” width=”200″ disableSorting=”0″/></row>’)   
    8. — Make sure to change the UserQueryID   
    9. WHERE UserQueryID=’71F94C46-F217-DF11-A241-0050569B4FF3′  
    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.

Categories: MS CRM 4.0
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: