i am working on sharepoint 2013, and i want to write a power-shell script, which update an item visibility on Create forms, and i want to update all the references of this column inside existing lists. but i am confused if i should use `PushChangesToLists
= $true` OR `$field.update($true)`, to update the site column and its referecnes inside exsisting lists.
so what are the differences between using $column.PushChangesToLists = $true with$column.Update() as follow:-
so what are the differences between using $column.PushChangesToLists = $true with$column.Update() as follow:-
$web = Get-SPWeb http://portal
$column = $web.Fields["Test Column"]
$column.PushChangesToLists = $true
$column.ShowInNewForm = $false
$column.Update()
$web.Update()
$web.Dispose()& using $column.Update($true)only, as follow:- $web = Get-SPWeb http://portal
$column = $web.Fields["Test Column"]
# REMOVED $column.PushChangesToLists = $true
$column.ShowInNewForm = $false
$column.Update($true) # UPDATED
$web.Update()
$web.Dispose()