Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, November 27, 2012 2:04 PM
Hi All,
In our SharePoint farm, document id are getting generated using Document ID Service. Document ID are uniques across the farm. there are around 40,000 site collections that has documents. document can be loaded using below URL passing the document id.
http://intranet.company.com/TeamsiteXY/_layouts/DocIdRedir.aspx?ID=TS-9-60
if document is moved to some other site collection, URL does break. i suppose it is because URL does include the site collection name i.e. TeamsiteXY.
Now customer want a generic URL to load the document using document id. this URL should work even after document is moved across the site collections or web applications. actually this new URL is required by a third party system to load the document. that system only maintains the document id.
I am not sure whether it is possible. could anyone please help me here?
using the fast search i am able to search the document using document id however customer don't want to invoke the search to load the document. it increare the overhead on the system.
Regards Amit
All replies (7)
Wednesday, November 28, 2012 9:04 AM âś…Answered | 2 votes
Hi,
I understand that you want to load document using document id. As far as I know, each document will have a unique document id. When you move the document to another location, the document id will not change. But it you copy one document and paste it to another location, a new document id will be generated. So you can use the relative path to get access to the document using document id. I have tried with a content editor web part. Put this line in the HTML source for the web part:
<a href="/_layouts/DocIdRedir.aspx?ID=TS-9-60">DOCUMENTNAME</a>
Then this link will take you to the correct document.
Thanks,
Entan Ming
Entan Ming
TechNet Community Support
Wednesday, November 28, 2012 2:28 AM | 1 vote
Your idea of using search is the best solution. Any other solution would introduce even more overhead. I am not sure why searching is adding overhead unless your talking about doing incremental crawls after documents are moved. The query itself is very light weight. If you search on document ID and get the path managed property that should work.
Blog | SharePoint Field Notes Dev Tool | ClassMaster
Wednesday, November 28, 2012 9:26 AM
Hi Entan,
I angree with your comments that on move, ID doesn't change and on copy ID does change, it make sense.
Relative path that you have refferred will work only when document is moved with-in the site collection. if document is moved to some other site collection then this path will not work.
Regards Amit
Wednesday, November 28, 2012 10:40 AM | 1 vote
Hi,
I have tested that in another site collection, the link will redirect to the right document. Although the relative path is not correct URL to the document, SharePoint can get you to the correct document with the document id.
Thanks,
Entan Ming
Entan Ming
TechNet Community Support
Wednesday, October 14, 2015 10:00 AM
What you say is true but when the original site the document was moved from is deleted or the relative path changed the original ID link is broken and fails to redirect. This seems like a major flaw when companies need to be able to archive / move / rename sites and retain working links.
What I fail to understand is... why include the subsite path in the ID link in the first place when it would happily work and redirect from the root of the site collection? That's likely to be a much more stable URL. Why doesn't SharePoint use that for all ID enabled document links by default?
There should be an option in the Doc ID site collection settings 'formulate all document ID links from the root of the site collection instead of the relative sub-site path'.
I'd love to know people's thoughts on this and whether it could be an added feature.
So instead of: https://<server>/dept/it/_layouts/15/DocIdRedir.aspx?ID=DOC-285824565-1197
All links would be offered as: https://<server>/_layouts/15/DocIdRedir.aspx?ID=DOC-285824565-1197
Problem solved without staff needing to edit links?
Paul
Wednesday, June 22, 2016 11:02 AM | 1 vote
There should be an option in the Doc ID site collection settings 'formulate all document ID links from the root of the site collection instead of the relative sub-site path'.
I'd love to know people's thoughts on this and whether it could be an added feature.
So instead of: https://<server>/dept/it/_layouts/15/DocIdRedir.aspx?ID=DOC-285824565-1197
All links would be offered as: https://<server>/_layouts/15/DocIdRedir.aspx?ID=DOC-285824565-1197
Problem solved without staff needing to edit links?
Paul
I second this! It doesn't happen often, but sometimes Webs change names oder get moved elsewhere. I suppose this would break the DocID link, if it's not manually edited to https://<server>/_layouts/DocIdRedir.aspx?ID=ABCD-1234. And I definitely can't get my users to take care of this. They want to right-click/copy the DocID link, and then paste it. If that's a link prone to be broken in the future (by changing the Web's name whatsoever), they will complain.
Thursday, June 22, 2017 3:26 PM
I also agree with using the site root.
For URLs created for document folders or libraries, does an equivalent unique ID exist? What would an invariant folder or libary URL look like?
Phil Fuhrman