Answered by:
Search for Inactive leads from quick find

Question
-
Hi,
I want CRM users to able to search for inactive leads from quick find. I am aware of an unsupported method of doing this (http://ryandev.com/how-to-include-inactive-records-in-microsoft-crm-40-quick-find/). But dont want to apply any unsupported solutions. Is there any other way of doing this? I think we can write a plugin for this. Please suggest.
Thanks
Wednesday, March 24, 2010 1:27 PM
Answers
-
- Marked as answer by DavidJennawayMVP, Moderator Thursday, June 3, 2010 6:53 PM
Friday, March 26, 2010 11:32 AM
All replies
-
Use a plugin on the Pre stage of the RetrieveMultiple message and remove the statecode condition from the QueryExpression.
May need to doubel check that it use RetrieveMultiple as it may use Execute and fetchXML.
MSCRM Bing'd - http://bingsoft.wordpress.comWednesday, March 24, 2010 1:33 PMModerator -
It would be very helpfull if you can point me to an article.
Thanks
Wednesday, March 24, 2010 1:40 PM -
QueryExpression objQueryExpression = (QueryExpression)context.inputParameters["Query"]; foreach (ConditionExpression objConditionExpression in objQueryExpression.Criteria.Conditions) { if (objConditionExpression.AttributeName == "statecode") { //Delete the ConditionExpression objQueryExpression.Criteria.Conditions.Remove(objConditionExpression); } }
Hope this helps
My blog : http://mscrmtools.blogspot.comYou will find:Bulk Delete Launcher View Layout replicator ISV.Config Manager Form Javascript Manager Assembly Recovery And others (use tool tag on my blog) Wednesday, March 24, 2010 2:01 PMModeratorrefer this article. It explains you step by step
http://crm.georged.id.au/post/2008/03/07/Displaying-inactive-records-in-associated-view.aspx
Regards
Vinoth- Proposed as answer by VinothBalasubramanian Thursday, March 25, 2010 6:53 AM
Wednesday, March 24, 2010 2:17 PMI would go with the approach that has been documented in the link of your original post. You can also refer to Vinoth's link for detail steps. The reason is, removing a filtering condition in quick find's customization XML won't have much chance to really break the CRM application. In contrary, the Plug-in approach would introduce certain performance overhead, which may not worth the gain.
Just my 2 cents.
Daniel Cai | http://danielcai.blogspot.comWednesday, March 24, 2010 3:02 PMWill this have any affect on "Advanced Find" if i use the same criteria that the filtered view has? I mean Advanced View will also use Retrieve Multiple in that case the plugin may interfere with my criteria, is that right?
Other way I was thinking is to have one custom button on the grid tool bar. When the user clicks on this link i want to use fetch XML and get the results from server. And want to display these results in a window. When user clicks on any of the lead in this window the Lead details window should open (it can be a active lead or inactive lead). Let me know if this works?
Thanks
Friday, March 26, 2010 10:03 AMOther way I was thinking is to have one custom button on the grid tool bar. When the user clicks on this link i want to use fetch XML and get the results from server. And want to display these results in a window. When user clicks on any of the lead in this window the Lead details window should open (it can be a active lead or inactive lead). Let me know if this works?
You can perfrom this by calling the advanced find (fetchdata.aspx) option itself. Only think is to create and pass the fetchXML based on your criteria as argument to the fetchdata.aspx
To make it more easier you can also retrieve the fetchxml of your views (active ot inactive / custom views) from SavedQuery modify the fetchxml and perfrom the operation.
refer http://social.microsoft.com/Forums/en/crmdevelopment/thread/75001e4a-d2f4-4407-83b3-3f0a4a721237
Refer
VinothFriday, March 26, 2010 10:14 AMWill this have any affect on "Advanced Find" if i use the same criteria that the filtered view has? I mean Advanced View will also use Retrieve Multiple in that case the plugin may interfere with my criteria, is that right?
Answering your first question "advanced Find" uses "Execute" message to get the details and not "retrieve multiple" message.
refer https://community.dynamics.com/blogs/crminogic/comments/20549.aspx
Regards
VinothFriday, March 26, 2010 10:28 AMThanks for the suggestion Vinoth, i will try this. Can you guide me to some book/material that explains about the various pages (like fetchdata.aspx) and the way we can use them.Friday, March 26, 2010 11:21 AM- Marked as answer by DavidJennawayMVP, Moderator Thursday, June 3, 2010 6:53 PM
Friday, March 26, 2010 11:32 AM