This topic has not yet been rated - Rate this topic

DocumentId.FindUrlById method

Finds the URL of a document with the specified DocumentId value and versionLabel parameter value.

Namespace:  Microsoft.Office.DocumentManagement
Assembly:  Microsoft.Office.DocumentManagement (in Microsoft.Office.DocumentManagement.dll)
public static string FindUrlById(
	SPSite site,
	string docId,
	string versionLabel
)

Parameters

site
Type: Microsoft.SharePoint.SPSite
ID to search for
docId
Type: System.String
SPSite object to search on
versionLabel
Type: System.String
Version of the label of the document for which to get the URL

Return value

Type: System.String
URL of the document as a String. null if the document is not found, or if more than one document is found
ExceptionCondition
ArgumentNullException

SPSite object value is set to null.

If there is more than one result, this method will return null. In that case, use the FindUrlsById() method.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.