Categories
Server

Hiding Fields in SharePoint 2010

This is a useful peice of PowerShell script to hide specific fields from the Edit form. ShowInEditForm can also be amended to ShowInNewForm. $assignment = Start-SPAssignment $web = Get-SPWeb http://mysharepointserver -AssignmentCollection $assignment $field = $web.Lists[“Announcements”].Fields[“Body”] $field.ShowInEditForm = $False $field.Update() Stop-SPAssignment $assignment

This is a useful peice of PowerShell script to hide specific fields from the Edit form. ShowInEditForm can also be amended to ShowInNewForm.

$assignment = Start-SPAssignment
$web = Get-SPWeb http://mysharepointserver -AssignmentCollection $assignment
$field = $web.Lists["Announcements"].Fields["Body"]
$field.ShowInEditForm = $False
$field.Update()
Stop-SPAssignment $assignment