Question

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.

Was it helpful?

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.

OTHER TIPS

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:

ListItem.Id property

The ListItem Id is generated after the item was created by the SharePoint system.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top