Forum Discussion
MBNielsen
May 22, 2019Copper Contributor
PnP issue on SPO DocumentSet
Hi I am struggeling with an PnP issue on Documents Sets. I need to update the property values on the Document Set shared properties as well as properties in documents (with different content types) ...
MichaelK408
May 07, 2021Copper Contributor
I'm doing something similar with Document Sets and custom content type and I've been successful updating properties with this:
$newDS = Add-PnPDocumentSet -List FixedAssetDocs -ContentType FixedAssetDocSet -Name "$dsTitle"
$addedDS = $web.GetFolder($newDS)
$addedDS.SetProperty("Title",$dsTitle)
$addedDS.SetProperty("ol_Department","$Department")
$addedDS.SetProperty("DateAcquired","$DateAcquired")
etc..
$addedDS.Update()
$list.update()
This works fine with the exception of the "DateAcquired" field and another text field. I've verified internal field names and all of that and still can't get those two fields to update.
$newDS = Add-PnPDocumentSet -List FixedAssetDocs -ContentType FixedAssetDocSet -Name "$dsTitle"
$addedDS = $web.GetFolder($newDS)
$addedDS.SetProperty("Title",$dsTitle)
$addedDS.SetProperty("ol_Department","$Department")
$addedDS.SetProperty("DateAcquired","$DateAcquired")
etc..
$addedDS.Update()
$list.update()
This works fine with the exception of the "DateAcquired" field and another text field. I've verified internal field names and all of that and still can't get those two fields to update.