DocumentId.FindUrlsById Method
SharePoint 2010
Finds the URLs of a document and all of its versions with a specified Id.
Assembly: Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
Parameters
- site
- Type: Microsoft.SharePoint.SPSite
ID to search for.
- docId
- Type: System.String
SPSite object to search on.
Return Value
Type: System.String[]Array of strings that represents the URLs of all versions of the document found with the specified DocumentId value.
| Exception | Condition |
|---|---|
| ArgumentNullException |
The SPSite object value is set to null. |
What does "Urls of all Versions" mean?
It can't mean version history, or else FindUrlById wouldn't work ( https://gist.github.com/601848 ) - it specifically expects one url, and opens the SPItem to find the version Url.
I have an issue with two documents with the same Document-ID (docx file and a pptx file), and not sure it's related. The default document-id is link also misbehaving.
Under what circumstances can FindUrlsById return more than a single item?
I have an issue with two documents with the same Document-ID (docx file and a pptx file), and not sure it's related. The default document-id is link also misbehaving.
Under what circumstances can FindUrlsById return more than a single item?
- 11/4/2010
- Kobi L