Reordering SharePoint Fields using PowerShell

The order in which fields are displayed in the New, Edit, and Display forms for a list item is determined by the FieldLinks order of its content type.

https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfieldlinkcollection_members(v=office.15).aspx

The SPFieldLinkCollection has a handy Reorder method that we can use to set the order of the fields, using their internal names

The script below does this through PowerShell:

$web = Get-SPWeb https://bubagum.sharepoint.com
$ct = $web.ContentTypes["Content Type Name"]

$ct.FieldLinks.Reorder(@("Title", "InternalName1", "InternalName2"))
$ct.Update($true)

Note: also need to make sure List Advanced Settings has Allow management of content types set to Yes.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s