Find duplicate items in SharePoint

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 “ free essays on the respiratory system a que edad debo tomar viagra https://servingourchildrendc.org/format/essay-on-feminist-nursing-theory/28/ broighter collar essay outline academic decathlon essay easy argumentative research essay topics masque of the red death essay question how to get viagra with no prescription baseball essay paxil side effects flouride follow go to link viagra 100mg canada how does cialis for women work levitra advertisement argumentative essay ghostwriting sites us best dissertation writing services uk viagra professional sale act 2 scene 3 romeo and juliet analysis essay ability essay high in philippine school student writing a simple essay about myself introduction que usar en lugar de viagra here essay chronological order months levitra rocky boy's agency https://georgehahn.com/playboy/accutane-waxing/15/ https://mdp.berkeley.edu/wp-content/uploads/?online=british-invasion-of-australia-essay-paper https://journeysmobilevet.com/edimprove/nebenwirkung-von-levitra-nach-erster-einnahme/26/ sample research paper outline pdf doctoral dissertation of https://eventorum.puc.edu/usarx/dosage-of-cialis-for-bph/82/ steven herrick by the river essay [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:

ECB View Duplicates
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:

  1. Create a folder named ViewDuplicates under FEATURES folder of your SharePoint installation.
  2. Create a file called Feature.xml under ViewDuplicates folder.
  3. Paste the following code in Feature.xml:
  4. <?xml version="1.0" encoding="utf-8"?>
    <Feature  Id="960206DD-D07E-4b64-AD8A-3E48D7527060"
              Title="View Duplicates"
              Description="This feature allows user to view duplicate copies of the selected document."
              ImageUrl="CALVIEW.GIF"
              Version="1.0.0.0"
              Scope="Site"
              Hidden="FALSE"
        xmlns="http://schemas.microsoft.com/sharepoint/">
      <ElementManifests>
        <ElementManifest Location="elements.xml"/>
      </ElementManifests>
    </Feature>
    
    
  5. Create a file called Elements.xml under ViewDuplicates folder.
  6. Paste the following code in Element.xml:
  7. <?xml version="1.0" encoding="utf-8" ?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    
      <!-- Per Item Dropdown (ECB) Link -->
      <CustomAction Id="ViewDuplicates.ECBItemMenu"
        RegistrationType="List"
        RegistrationId="101"
        ImageUrl="/_layouts/images/GORTL.GIF"
        Location="EditControlBlock"
        Sequence="300"
        Title="View Duplicates">
        <UrlAction Url="javascript:function findDuplicates(){var itemUrl='{ItemUrl}'; var fullUrl=location.protocol+'//'+location.host+itemUrl;  window.location.href='/Search/results.aspx?k=duplicates:&quot;'+ fullUrl + '&quot;'};findDuplicates();"/>
      </CustomAction>
    
    </Elements>
    
    
  8. Install the feature by executing stsadm -o installfeature -name ViewDuplicates
  9. Activate the feature by executing stsadm -o activatefeature -name ViewDuplicates -url <YourSiteCollectionUrl>. Replace <YourSiteCollectionUrl> by the url of your site collection.
  10. Now, you will get “View Duplicates” option with every document. Click it and Enjoy!
Share

1 thought on “Find duplicate items in SharePoint”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Share via
Copy link
Powered by Social Snap