SharePoint Online - Possible to update ID column value in a list for an existing item?
-
08-02-2021 - |
문제
In SharePoint Online, Is there a way to update the ID column(for an existing item) in a list with our value?
We have a SharePoint list where I want to update the ID column value with my own value. I just want to update it for one item as is it impacting one of our solution.
해결책
No, this is not possible.
Even after setting the ReadOnlyField property of the field to false
you will get an error when trying to update it:
❯ Set-PnPListItem -List TestList -Identity 1 -Values @{ID=20}
Set-PnPListItem : This field cannot be updated.
다른 팁
Short answer is SharePoint List Item Id is read only, can't be updated with custom value.
If you are using SharePoint Online, please check the CSOM ListItem class here:
The ListItem Id is generated after the item was created by the SharePoint system.
제휴하지 않습니다 sharepoint.stackexchange