Skip to main content

Notifications

Power Automate - Building Flows
Unanswered

Update modified by in sharepoint without adding a version to file

(0) ShareShare
ReportReport
Posted on by 2,563

Hi

 

Im trying to updated the modified by field in a sharepoint list using a send an Http request.

This works fine but the last part is where i dont want this to add a new version to the file.

 

My flow publishes a major version and then i set the modified by user. This results in me getting a version history where it says published major version 2.0 (By System account) and a published major version 2.1 (By user)

 

Im using this solution: http://johnliu.net/blog/2019/2/flowninja-hack-78-modifying-modified-by-and-modified-time-with-microsoft-flow

 

But the  bNewDocumentUpdate:true dont seem to work.

Anyone know if bNewDocumentUpdate:true stoped working? Or maybe have another solution.

 

2019-10-28 19_40_15-Edit your flow _ Microsoft Flow.png

  • Suggested answer
    DB-20011720-0 Profile Picture
    DB-20011720-0 4 on at
    Update modified by in sharepoint without adding a version to file
    I know this post is old, but I believe the issue is that the value for bNewDocumentUpdate value must be set to false if you are wanting to suppress version updates
  • xtra1211 Profile Picture
    xtra1211 18 on at
    Re: Update modified by in sharepoint without adding a version to file

    just found that you can get through this issue using power shell as described here...

    this uses the ListItem.SystemUpdate() method.

     

    https://www.sharepointdiary.com/2015/07/sharepoint-online-update-list-items-using-powershell.html

     

    it need to be adjust to your context if you first need to filter items your are targeting...

     

    this works for my use case to make a one time bulk update however this can not be triggered from a flow. unfortunalty.

     

  • xtra1211 Profile Picture
    xtra1211 18 on at
    Re: Update modified by in sharepoint without adding a version to file

    I've been struggling with the same issue ...

    HTTP update without modifying the version works fine if i'm on a minor version and making changes to any colomn.

    If I start playing with a major version, I end up with a bad gateway and message says "addings to the web site are locked".

    When using the HTTP request to change any mandatory metadata on a major version (author, modified ...) The flow will finish correctly but this will ignore the "bNewDocumentUpdate": true parameter. And then the document ends in a next minor version...

    I've tried disabling check-in/out and approval required to the library to find out how to unlock the modification. But no luck.

    I've published hundreds of documents that have a wrong setting in a column, no way to update that without updating the version to next minor version... and republish to the next major version !

    That's a shame.

  • JimmyW Profile Picture
    JimmyW 2,563 on at
    Re: Update modified by in sharepoint without adding a version to file

    @Gristy It should work according to the web link.

    They are updating time and date and editor.

  • Gristy Profile Picture
    Gristy 2,429 on at
    Re: Update modified by in sharepoint without adding a version to file

    not sure if it works if you modify the editor or author properites, can you try just updating something else instead to see if it reacts the same way?

  • JimmyW Profile Picture
    JimmyW 2,563 on at
    Re: Update modified by in sharepoint without adding a version to file

    @RobElliott Thanks 🙂 it works without also 😉

    But i need to come around updating the item without updating the version history, im just updateing the modified by field.

     

    This is how the version history looks like. And i dont want the extra .1

    2019-10-28 21_25_32-Systems Department - Workspaces Test - All Documents.png

  • RobElliott Profile Picture
    RobElliott 9,997 on at
    Re: Update modified by in sharepoint without adding a version to file

    Hi @JimmyWork, I can't answer the question but in the uri field your ID should have apostrophes ('ID') round it.

    Rob
    Los Gallardos
    If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,445

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,741

Leaderboard