SharePoint 2016 general availability was announced in the Future Of SharePoint conference in May 2016. The series that discusses the installation of SharePoint 2016 in Azure can be found at C# Corner from the below links,
Nintex is a premium technology partner for SharePoint. With the announcement of SharePoint 2016, Nintex has made the announcement of the general availability of Nintex Workflow 2016, on July 11, 2016.
In this article, we will see how to create a SharePoint Group using Nintex Workflow, based on the list item created in a configuration list. The scope of the article is:
- Create a configuration list that will hold the SharePoint Group creation information.
- Create an item in the list which will include SharePoint Group Name.
- Trigger a Nintex Workflow on item creation and create a SharePoint Group based on the configuration List Item column values.
Create the following columns in the SharePoint List.
Now, the basic infrastructure is in place. Let’s go ahead and design the workflow. Click on ‘Create a Workflow in Nintex Workflow’ from the Workflow Settings option.
This will open the Nintex Workflow designer. Right click the workflow and add the ‘Call Web Service’ activity.
The action will show the following warning as some of the configuration values are missing.
From the drop down, click on ‘Configure’.
The configuration page contains the details that will be used for SharePoint group creation. In the URL field, add the URL for the usergroup.asmx. We will fetch the web URL dynamically and append “_vti_bin/usergroup.asmx” to it, so that a full web service URL is created. From Insert Reference tab, add Web URL.
Add the site collection administrator credentials which will be used by the workflow to connect to the web service. Click on Refresh. This will populate the web methods in the drop down.
Select the web method that will be used to create the SharePoint Group, i.e.,‘AddGroup’.
We have to add a set of Web Service input parameters, as shown below. ‘groupName’ will be dynamically assigned the value of the List Column ‘SP Group Name’.
‘ownerIdentifier’ will be dynamically assigned the value of the Configuration List Column ‘ownerIdentifier’.
‘ownerType’ will be dynamically assigned the value of the Configuration List Column ‘ownerType’.
‘defaultUserLoginName’ will be dynamically assigned the value of the Configuration List Column ‘DefaultUserLoginName’.
‘description’ will be dynamically assigned the value of the Configuration List Column ‘Group Description’.
Thus, the form after all the configurations will look as shown below.
Ensure that you select the check box ‘Encode inserted tokens’, else you might stumble upon web service invocation error as shown below.
If you want to see the SOAP message that is sent to the web service, select the radio button ‘SOAP Editor’.
The workflow activity will finally look like:
Now, let’s mention when the workflow should run. Select Workflow Settings.
Specify the workflow name and description, and set the start conditions ‘Start when items are created’ to Yes.
Go ahead and publish the workflow.
Make any final changes to the workflow name and description.
The publishing of the workflow has started.
Finally, the workflow is published.
Let’s create a list item with the name of the SharePoint Group that has to be created.Specify the SP Group Name,Group Description,Owner Type,Default User Login Name, and Owner Identifier, which will be used by the web service to create the group.
A new column by the name of the workflow has come up in the list and it shows the status of the workflow. The status has become ‘Completed’ which shows the successful creation of the group.
Heading over to the People and Groups page, we can see the newly created site there.
Summary
Thus, we learned how to create a Group in SharePoint 2016, based on the list item created in a list, using web service and Nintex Workflow 2016.