In this post, we will discuss how we can use app step workflow action in Nintex Workflow for Office 365 SharePoint Online. This will be very much helpful if you want to do some elevated privileges tasks inside your workflow. In this example, we will use two nintex workflow action: App Step and Delete Item.
Also, you can read:
– App Step in SharePoint 2013 Designer Workflow
– The dictionary actions example in SharePoint Designer 2013
– SharePoint 2013 Using REST API Selecting filtering sorting and pagination in SharePoint list
Let us say I have a user who has Contribute No Delete permission. For this, I have created a custom permission level by copying the Contribute permission and then assign it to one user.
After that I am going to create a nintex workflow which will have one workflow action Delete Item. Open the SharePoint online list, from the ribbon click on Nintex workflow. This will open the workflow gallery. In the workflow, gallery clicks on Create new nintex workflow button to create a new workflow. Then I have added a Delete Item workflow action into it.
Double click on the Delete Item workflow action to configure the workflow action. Here I have chosen to Delete the current item.
Now publish the workflow and once the workflow successfully published, go back to the list and run the workflow manually for one item. Just to let you know that I have set the workflow to run manually option.
Ideally, when you run the workflow it should delete the item. But if you will see the workflow, you will see something error like below:
The workflow is not able to delete the item because the user does not have permission to delete the item.
Now here comes our App Step, this will be helpful to elevated privileges. Go back to the list and from the ribbon click on nintex workflow to open the workflow gallery. Click on the particular workflow to edit the workflow. Now add an app step to the workflow. Inside the app step add the Delete Item workflow action. So the workflow should looks like below:
Here one thing you should remember that, In order to make App Step work correctly, make sure “Workflow can use app permissions” feature is Activated in the site. To make sure it is activated or not, go back to the site settings , then click on Manage site features which is under Site Actions section. There search for “Workflow can use app permissions” feature and if it is not activated activate it. If you will not activate it will give error in the App Step in workflow.
Now publish the workflow and try to run the workflow for the item. This time it will delete the item, even if the user does not have permission to delete.
Hope this article will be helpful to you.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.