0

I have a custom list named WorkOrders inside our SharePoint online tenant. now this custom list contain around 10K items. and i want to do some modifications to existing list items, as follow:-

1- I want to add a new custom column named Media.

2- Based on some calculation from another list i want to update this custom column Media.

but the ModifiedBy and Modified date for the work order items are important to us, and we do not want to affect those 2 fields when updating the new custom column.. so is there a way to update a list item without affecting the Modified By and Modified Date, by using:-

1- SharePoint Rest API

2- Pnp PowerShell

3- Pnp SDK

4- Power Automate

any advice?

EDIT

I tried this using Power Automate:-

enter image description here

enter image description here

This will not update the MediumID, MediumTitleSync and the Title. Now if I do not pass the Modified value, the MediumID, MediumTitleSync and the Title will get updated but the Modified date will be updated as well... so not sure if this will work for me

4
  • Modified and Modified by columns are used to record when and who modified items. In the SharePoint mechanism, it is designed and established. There is no possibility to update list items in SharePoint Online without updating their Modified and Modified by columns. Commented Sep 13 at 1:28
  • 2
    Yes, it is possible using SharePoint REST API ValidateUpdateListItem endpoint. You can capture previous value of modified by and modified and pass same values while using above endpoint to update other column values. Check #1 and #2. Commented Sep 13 at 3:29
  • @GaneshSanap-MVP if i pass the Editor & Modified the item will not get updated .. can you check my edit Commented Sep 13 at 15:20
  • @GaneshSanap-MVP can you check my edit to the original question? Commented Sep 13 at 15:41

2 Answers 2

1

I were able to solve this issue by using the SystemUpdateAsync() using PnP Core SDK

-1

For "silent" updates that do not trigger any flow/actions and do not create new version history, use ValidateUpdateListItem action. It is poorly documented, so expect to do some trial-and-error when implementing. Previously in on-prem versions it is called "System update".

You can use it by sending an HTTP request to:
_api/web/lists/GetByTitle('[--title-]')/items([--id--])/validateUpdateListItem

enter image description here

Some references :
SP.ListItem.validateUpdateListItem Method (sp.js)
ValidateUpdateListItem method
MS Q&A question about Hyperlink column
blog post

5
  • did you try your approach ? as based on my test it will modify the Modified & ModifiedBy values!! Commented Sep 13 at 15:19
  • your appraoch will not create a new version , but will update the Modified & Modified BY values Commented Sep 13 at 15:24
  • Yes, I tested. Did I said anything wrong? Agree that my response is not a sufficient solution to your problem - flow could be ran by non-personal system account, so for end user it would seem as "system has done an update", rather than one person. As others pointed out, no way to completely bypass modification on those fields. Commented Sep 13 at 22:22
  • but my question was on how to do an update without modifying the Modified and ModifiedBy fields.. not doing what u called a silent update. any way i achieved what i were looking for using the SystemUpdate using pnp core sdk.. thanks for your help anyway Commented Sep 14 at 10:25
  • 1
    Agree - answer does not satisfy requirements. My apologies for that. Glad that you resolved it - appreciate if removed downvote.. Commented Sep 14 at 18:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.