Interview Questions administrator

Best SharePoint administrator Interview Questions and Answers with topic wise:


Recycle Bin | MMS | ManagedVsCrawledProperties |

Monday, December 1, 2014

Re-Order the sharepoint site columns in content type using powershell script


$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