Thursday, July 6, 2017

SharePoint SPWeb Property ParserEnabled

ParserEnabled :- property controls demotion and promotion.
Promotion :- The process of extracting values from properties of a document and writing those values to corresponding columns on the sharepoint list or document library where the document is stored.

Demotion :- The same process in reverse.Read sharepoint list or library columns values and written to document properties.

When ParserEnabled property false there will not be any property demotion and promotion, which means metadata and document file properties will not be in sync.

PowerShell way of Disabling and enabling this property:
Disable ParserEnabled property:
    [system.reflection.assembly]::LoadWithPartialName("Microsoft.SharePoint")
    $site = new-object Microsoft.SharePoint.SPSite("http://mossweb/sites/test")
    $site.RootWeb.ParserEnabled = $false
    $site.RootWeb.Update()

Enable ParserEnabled property or document property promotion:
    $site.RootWeb.ParserEnabled = $true
    $site.RootWeb.Update()

No comments:

Post a Comment