Managing Versioning in Visual Studio .NET

Make QR Code ISO/IEC18004 in Visual Studio .NET Managing Versioning

Managing Versioning
Scanning QR Code ISO/IEC18004 In .NET
Using Barcode Control SDK for Visual Studio .NET Control to generate, create, read, scan barcode image in Visual Studio .NET applications.
QR Code Encoder In .NET Framework
Using Barcode generation for VS .NET Control to generate, create QR Code JIS X 0510 image in VS .NET applications.
$spListEnableModeration = $true; } if ($disable) { # Disable content approval $spListEnableModeration = $false; } $spListUpdate(); }
Decoding QR In VS .NET
Using Barcode decoder for .NET framework Control to read, scan read, scan image in VS .NET applications.
Create Bar Code In Visual Studio .NET
Using Barcode creation for VS .NET Control to generate, create bar code image in VS .NET applications.
To use the function to enable content approval for a list or document library, type the following:
Reading Bar Code In .NET
Using Barcode decoder for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
QR-Code Printer In Visual C#.NET
Using Barcode creation for Visual Studio .NET Control to generate, create QR Code JIS X 0510 image in Visual Studio .NET applications.
PS > Set-SPContentApproval -url "http://nimaintranet/Shared Documents" ` >> -enable
Generate QR In .NET
Using Barcode maker for ASP.NET Control to generate, create QR Code ISO/IEC18004 image in ASP.NET applications.
QR Code ISO/IEC18004 Creation In Visual Basic .NET
Using Barcode drawer for VS .NET Control to generate, create QR Code JIS X 0510 image in Visual Studio .NET applications.
To disable content approval, use the disable parameter
Barcode Encoder In .NET Framework
Using Barcode generator for VS .NET Control to generate, create bar code image in Visual Studio .NET applications.
Painting GS1 DataBar Stacked In VS .NET
Using Barcode drawer for .NET Control to generate, create DataBar image in VS .NET applications.
PS > Set-SPContentApproval -url "http://nimaintranet/Shared Documents" ` >> -disable
Draw Bar Code In Visual Studio .NET
Using Barcode creation for Visual Studio .NET Control to generate, create bar code image in .NET framework applications.
Generate USS Code 93 In .NET Framework
Using Barcode generator for .NET Control to generate, create ANSI/AIM Code 93 image in .NET framework applications.
Version History
Make Matrix Barcode In Java
Using Barcode drawer for Java Control to generate, create Matrix Barcode image in Java applications.
Print Bar Code In Visual C#.NET
Using Barcode generator for .NET framework Control to generate, create barcode image in Visual Studio .NET applications.
By default, version history is not enabled in any new lists or document libraries When enabling version history in a list, you have the option to create a version each time an item in the list is edited Document libraries also support major and minor versions, such as 10, 11, and so on The SPList and the SPDocumentLibrary classes include the EnableVersioning property The following example demonstrates how to enable version history in a list in SharePoint 2010
Reading GS1 128 In VB.NET
Using Barcode recognizer for VS .NET Control to read, scan read, scan image in .NET framework applications.
Draw Barcode In Visual Basic .NET
Using Barcode creator for Visual Studio .NET Control to generate, create bar code image in VS .NET applications.
PS > $spList = Get-SPList -url "http://nimaintranet/site/Lists/My Custom List" PS > $spListEnableVersioning = $true PS > $spListUpdate()
Barcode Printer In Objective-C
Using Barcode creator for iPhone Control to generate, create bar code image in iPhone applications.
Draw UPC-A Supplement 5 In None
Using Barcode printer for Microsoft Word Control to generate, create UCC - 12 image in Microsoft Word applications.
The SPDocumentLibrary class also provides the EnableMinorVersions property, which you can use as follows:
Code 39 Full ASCII Reader In VB.NET
Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
Bar Code Printer In VS .NET
Using Barcode maker for ASP.NET Control to generate, create barcode image in ASP.NET applications.
PS >> PS PS PS > $spDocumentLibrary = Get-SPList -url "http://nimaintranet/site/Shared Documents" > $spDocumentLibraryEnableVersioning = $true > $spDocumentLibraryEnableMinorVersions = $true > $spDocumentLibraryUpdate()
You can also specify the number of versions to retain using the MajorVersionLimit property, and the number of major (published and/or approved) versions for which
PowerShell for Microsoft SharePoint 2010 Administrators
drafts should be kept using the MajorWithMinorVersionsLimit property supported by both lists and document libraries The next example shows how to set the number of major versions to retain and the number of versions for which drafts should be kept in a document library
PS > $spDocumentLibraryMajorVersionLimit = 10 PS > $spDocumentLibraryMajorWithMinorVersionsLimit = 5 PS > $spDocumentLibraryUpdate()
NOTE When setting the MajorWithMinorVersionsLimit property on an SPList, content approval must be enabled The following Set-SPVersionHistory function supports both lists and documents
function Set-SPVersionHistory ( [string]$url, [switch]$enable, [switch]$enableMinor, [switch]$disable, [int]$version=0, [int]$draft=0 ) { # Use the Get-SPList function to retrieve a list $spList = Get-SPList -url $url if ($enable -or $enableMinor) { # Enable Versioning $spListEnableVersioning = $true; if($enableMinor -and ` $spList -is [MicrosoftSharePointSPDocumentLibrary]) { # Enable Major and Minor Version $spListEnableMinorVersions = $true; } # Set number of versions to keep $spListMajorVersionLimit = $version; # Set the number of versions for which drafts should be kept if ($spListEnableModeration -eq $true) { $spListMajorWithMinorVersionsLimit = $draft } else { Write-Host Enable Content Approval for the list: $splist }
17:
Managing Versioning
} if ($disable) { # Disable Versioning $spListEnableVersioning = $false if($spList -is [MicrosoftSharePointSPDocumentLibrary]) { # Disable versioning on document library $spListEnableMinorVersions = $false; } } $spListUpdate() }
You can use the function to enable version history on a list by typing the following:
PS > Set-SPVersionHistory -url "http://nimaintranet/Site/Lists/My Custom List" ` >> -enable -version 10 -draft 5
In this example, we enable versioning in the list My Custom List We also set the maximum number of major versions to 10 On those for which draft versions will be retained, we set the maximum to 5 If you want to enable versioning in a document library, use an URL to a document library as input to the url parameter
PS > Set-SPVersionHistory -url "http://nimaintranet/site/Shared Documents ` >> -enableMinor -version 10 -draft 5
In this example, we use the enableMinor switch parameter to enable major and minor versions We also specify that we want to retain 10 major versions, the latest 5 out of which will also retain draft history
Draft Item Security
With draft item security, we can limit the ability of users to see draft items in a list or document library With SharePoint 2010 lists, content approval must be enabled for draft item security to be used With document libraries, you can grant the right to view drafts to users who can read or edit documents, but granting it to those who can approve obviously requires that content approval be enabled You can set the draft item security using the DraftVersionVisibility property, which accepts the following values:
Copyright © OnBarcode.com . All rights reserved.