Dec 05 2016 07:19 AM
I seem to recall someone saying / writing that updates were coming to SharePoint Online CSOM where you could update a list item without triggering workflows (like you can on prem), did that ever come to fruition?
Dec 05 2016 07:24 AM
Mmmm...first time I heard this, but I'm pretty sure @Vesa Juvonen will have the answer to this question
Dec 05 2016 11:43 AM
Dec 05 2016 11:43 AM
Dec 06 2016 10:04 AM
Dec 06 2016 05:08 PM
SystemUpdate is not available in CSOM on prem, it's only in the server side object model. it allows you to update items without affecting last update user /time or running workflows. It is meant to be used by trusted code. I guess it's not in the csom because if it were, anyone who had update authority to a list would be able to make a simple ajax call from their browser and change the last update user/time or running any workflows,
there would have to be some changes to the security model before they would ever allow this in the csom.
Dec 07 2016 01:05 AM - edited Dec 07 2016 07:18 AM
SolutionHi there,
SystemUpdate is presented in CSOM/JSOM too, actually. It was added in SPO sometime before and seems like it works very close to SSOM's method:
Here is a sample in JavaScript (should be executed on classic display or edit form):
var clientContext = new SP.ClientContext.get_current(); var oList = clientContext.get_web().get_lists().getById(_spPageContextInfo.pageListId); var oListItem = oList.getItemById(GetUrlKeyValue("ID")); oListItem.set_item('Title', 'New title'); oListItem.systemUpdate(); clientContext.executeQueryAsync( function() { console.log('Item has been updated'); }, function(sender, args) { console.log('Error: ' + args.get_message() + ' ' + args.get_stackTrace()); } );
Didn't check if the CSOM (C#) behavior is the same.
Anyway, maybe it will be helpful.
Dec 07 2016 07:47 AM
Thanks for the info Andrew-- I had no Idea they added that to the CSOM!
Still seems like it could be a security issue if a user can update any metadata on a list without having temselves tagged as the last update user.
Dec 07 2016 07:57 AM
Dec 07 2016 07:58 AM
I believe that a user should be a member of Site Owners or site collection admin to be able to execute systemUpdate.
Dec 08 2016 10:12 AM
Apr 06 2019 05:42 AM
@Andrew Koltyakov - Would you happen to know an all encompassing PS script that can be used to stop SP WFs, update user identities on the WF and then restart all SharePoint Workflows? We're in the process of migrating an online secure tenant to GCC SharePoint tenant and the user identity mappings are changing. So, I was looking to see if this is possible to do using a PowerShell script. I've turned over many rocks during my online search, but can't seem to find a script that comes close to doing the described functions.
Thanks for any help or advise you can offer
Vincent T.