Want to know how to delete the fieldlinks for the content type.
Write-Host "Deleted Redundant ACL Columns from List " $list " for
web " $web.title
$sitecols = @{"BU" = "BU"; "Discipline" = "Discipline";}
$cttypes = @("Memo","Model")
foreach ($cttype in $cttypes)
{
$cttypeo = $list.contenttypes[$cttype]
$cttypeo.FieldLinks.delete($fieldbuLink.Id)
$cttypeo.FieldLinks.delete($fielddisciplineLink.Id)
}
I am trying to apply the above code for deleting the List Content Type
association for my Document Library
.But somehow its not working.What I am missing here? After executing this script I am still able to see the list content type association still exists!