Open Wiki Page by ID and not by Name
-
08-12-2020 - |
Question
Standard behavior of SharePoint Wiki: accessing the page via URL (containing name of page), e.g. SharePoint.com/WikiLibrary/NameOfThePage.aspx
I want to know if there is a possibility to access the page using the ID
I know it is possible to use DispForm.aspx?ID=123 but this opens the form and not the Wiki Page Layout
Use Case is that I want to provide links to dedicated pages from an external application - standard URLs can change if someone renames the page, calling a page via ID will not break in case of rename.
Anybody knows a possibility? Thanks for your support.
Solution
After some research I found an ootb possibility:
- Enable "Document ID Service" in the Site Collection Features
- New entry in the Site Collection Administration appears: "Document ID settings"
- In this menu you can define a prefix for your Document IDs
- In any list/library a new column is provided: Document ID (linked to document)
- Display this column in a list view --> use the provided URL of this column for linkage
For information: the URL to be used looks like: yoursitecollection/_layouts/15/DocIdRedir.aspx?ID=DocIDPrefix-SomeNumbers-ID
yoursitecollection/_layouts/15/DocIdRedir.aspx?ID=DocIDPrefix-12345678910-1234