$URL = "http://LocalHost/”
$site = New-Object Microsoft.SharePoint.SPSite($URL)
$web = $site.openweb()
$myCustomContentype=$web.ContentTypes["MySiteContentType"]
$newFieldOrder = @("Title","MyCOl1","MyCol3","FileLeafRef","MyCOl5","MyCol2")
$myCustomContentype.FieldLinks.Reorder($newFieldOrder)
$myCustomContentype.Update()
Name: Only refer the Sharepoint internal names for reorder.
Example: Internal name for “Title” is “FileLeafRef”
No comments:
Post a Comment