Forum Discussion
Updating Editor field on SharePoint Online using the CSOM with App Only Auth
you could try to set these fields using
item.systemUpdate()
instead of just "item.update()". The latter always creates a new version with the current user as the editor.
If you use the "ValidateUpdateListItem" Rest API then you have to set the "bNewDocumentUpdate” to true to perform a SystemUpdate, but i don't know how exactly you need to use that in the CSOM code above.
Best Regards,
Sven
Hi SvenSieverding ,
Thank you for your response.
The signature of the ValidateUpdateListItem is the following one:
public IList<ListItemFormUpdateValue> ValidateUpdateListItem(IList<ListItemFormUpdateValue> formValues, bool bNewDocumentUpdate, string checkInComment);
When I am using it, I set the second parameter to true, but it still doesn't work.
I searched for SystemUpdate, but I cannot find it on Microsoft.SharePoint.Client.ListItem class.
Best regards,
Cristina
- João MiguelNov 21, 2023Copper Contributor
Did you managed to find the solution?
In my case the code works fine on a list but it doesn't work for another list similar to the first one.PS: Found the culprit. The app didn't had full control.