Jul 05 2022 11:45 PM - edited Jul 05 2022 11:46 PM
Hello,
i have a contenttype which uses a multiline column for approval comments. This column should be hidden in the new form and the edit form, because it is filled with content by a workflow.
But when i set ShowInNewForm and ShowInEditForm to false, the column is not shown in the display form. I have to set ShowInEditForm to true to see the column in the DisplayForm.
I use PnP to get and set the contenttype
$ListContentType = Get-PnPContentType -list "Technology" -Identity "TechContenttype"
$ContentTypeFields = Get-PnPProperty -ClientObject $ListContentType -Property Fields
$ctx = get-PnPContext
$field.SetShowInNewForm($false)
$field.SetShowInEditForm($false)
$field.Update()
$ListContentType.Update($false)
$ctx.ExecuteQuery()
Thanks for help,
Lutz