There are some situations when two different users of SharePoint upload same document with two different names. This mostly happens when both of them do not know that someone else has already uploaded same document earlier. SharePoint displays the “[View duplicates]” link when it finds duplicate items for a given search result.
On clicking the “[View duplicates]” link, you will notice that SharePoint searches the duplicate items by creating a keyword query of “duplicate:Full Document Url”
To make our life easier, I have created a Feature which will add a context menu item in ECB and will allow user to directly find duplicates for any item, from the context menu, without first going to the search page.
To get the idea, here is a snapshot of what you will get once our feature is activate:
Edit Control Block Menu for View Duplicates Option
User will just click on View Duplicates option and will get all the duplicate documents for the selected document.
Implementation:
Create a folder named ViewDuplicates under FEATURES folder of your SharePoint installation.
Create a file called Feature.xml under ViewDuplicates folder.
<UrlActionUrl="javascript:function findDuplicates(){var itemUrl='{ItemUrl}'; var fullUrl=location.protocol+'//'+location.host+itemUrl; window.location.href='/Search/results.aspx?k=duplicates:"'+ fullUrl + '"'};findDuplicates();"/>
13
</CustomAction>
14
15
</Elements>
Install the feature by executing stsadm -o installfeature -name ViewDuplicates
Activate the feature by executing stsadm -o activatefeature -name ViewDuplicates -url <YourSiteCollectionUrl>. Replace <YourSiteCollectionUrl> by the url of your site collection.
Now, you will get “View Duplicates” option with every document. Click it and Enjoy!
1 thought on “Find duplicate items in SharePoint”
Thanks, nice and useful
Comments are closed.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRejectSettings
Privacy & Cookies Policy
Privacy Overview
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the ...
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Thanks, nice and useful