Frage

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.

War es hilfreich?

Lösung

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.

Andere Tipps

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit sharepoint.stackexchange
scroll top