PromotedItemCollection.AddPromotedDocument Method
Creates a promoted document and adds it to the collection.
Namespace: Microsoft.SharePoint.Search.Extended.Administration.Keywords
Assembly: Microsoft.SharePoint.Search.Extended.Administration (in Microsoft.SharePoint.Search.Extended.Administration.dll)
Syntax
'Declaration
Function AddPromotedDocument ( _
documentId As String _
) As PromotedDocument
'Usage
Dim instance As PromotedItemCollection
Dim documentId As String
Dim returnValue As PromotedDocument
returnValue = instance.AddPromotedDocument(documentId)
PromotedDocument AddPromotedDocument(
string documentId
)
Parameters
documentId
Type: System.StringThe document ID of the document which should be promoted.
Return Value
Type: Microsoft.SharePoint.Search.Extended.Administration.Keywords.PromotedDocument
A PromotedDocument representing the added promoted document.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The [documentId] is [null]. |
AdminException | The add operation.fails. An example of an add operation that will fail is adding an already existing promoted item to the collection. |
See Also
Reference
PromotedItemCollection Interface
PromotedItemCollection Members
Microsoft.SharePoint.Search.Extended.Administration.Keywords Namespace