Display distinct records in CRM 2011
-
24. července 2012 7:17
I have a requirement where i have to display distinct records in an associated view. suppose there are 2 or 3 duplicate records, only 1 of them should be displayed in the associated view. On click of that, the record should open.
Any ideas on this?
Všechny reakce
-
24. července 2012 7:49Přispěvatel
Hi,
Interesting requirement - here are some options:
1) Use duplicate detection rules to deactivate the duplicates and prevent the duplicates being created in the first place. (http://msdn.microsoft.com/en-us/library/gg309427.aspx)
2) Create a custom report and embed that in your form (http://a33ik.blogspot.com/2012/05/embed-context-report-to-left-navigation.html)
3) Use a RetrieveMultiple plugin to remove the duplicates - but I don't recommend this due to the performance/complexity implications (http://blogs.msdn.com/b/ukcrm/archive/2011/03/10/using-plug-ins-to-modify-views.aspx)
I would recommend option 1 - since this will ensure your data is clean - also it would mean that there is only one record to open, where if you have duplicates, how would you know which record to open?
Hope this helps,
Scott
Scott Durow
Read my blog: www.develop1.net/public
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful" -
24. července 2012 12:55I want all the records to be active...but in the view i want only the first one to be displayed
-
24. července 2012 13:39Přispěvatel
Hi,
I think the custom report is going to be your best option then. You can use distinct in your query.
Scott
Scott Durow
Read my blog: www.develop1.net/public
If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"- Navržen jako odpověď Scott DurowMicrosoft Community Contributor, Editor 28. července 2012 7:10
- Označen jako odpověď JLattimerMicrosoft Community Contributor, Moderator 24. prosince 2012 4:17