A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
How to disable column edit function but allow API to add file
In SharePoint Online Document library, we have metadata with column 1,2,3,4. A REST API is used to add document to the columns. We want column 2,3,4 read only ( column 1 still editable). I used PnP PowerShell to make column 2,3,4 read only, as below,
$Docs= Get-PnPList -Identity Lists/ByItemID
$Number = Get-PnPField -List "ByItemID" -Identity "Number"
$Number.ReadOnlyField = $true
$Number.UpdateAndPushChanges($true)
$Docs.Context.ExecuteQuery();
but this affects REST API to add document to the columns 2,3,4. i.e. REST API cannot add document to the column 2,3,4. Any solution or suggestion on this case? Thanks
Microsoft 365 and Office | SharePoint | For business | Windows
1 answer
Sort by: Newest
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more