Changing permissions within the workflow, to rename a filename without delete rights


Badge +1

Good Morning everyone,

I got a problem, which is hopefully possible to solve.

I got a workflow, which changes the file-name of a document automatically, when changing the metadata. The problem is, if a user has no delete-permission, it is getting an error (I know - u need delete permission to change a filename in SharePoint).

So I tried to give in the workflow delete permission to the user who started the workflow, before the workflow tries to change the filename, and after that, taking the delete-permission back - but it still doesnt work. I first thought, it is reacting too fast, so the permission doesnt apply before the workflow takes the step to change the filename - so I paused the workflow for about 3 Minutes, which should be enough... still doesnt work, so the Problem is something different I think.


Anyone knows, what is causing this? Thanks for your help in advance!


3 replies

Badge +9

see Handling Permissions in Workflows from  

Badge +16

Yes sounds like you need to add a commit pending changes in there - detailed more carefully in the blog post mentioned above happy.png

Badge +1

I even used commit pending changes - it didnt work, sadly. Now I solved it, with the state machine! In the first state, I put the needed permission, then also addet "commit pending changes", then in the second state I put the filename change. Without the state machine, no matter how many "commit pending changes" I put in there, it didnt work. Still, thanks for the help though!

Reply