Monday, June 18, 2012

Adding SP Users into SP Group Dynamically

Requirement:
How o Add multiple users into SP2010 Group Dynamically

Solution:
We can achieve it in two ways as below:
1.Using UserGroup.asmx(AddUserToGroup) which is tedious process as below:
Above web service will work only when we pass User Name, User Login Name, User Email and to get these information we need to use Query User profile and need to loop all users.

2.Using UserGroup.asmx(AddUserCollectionToGroup) which is easy as below:

a)Build String - This will concatenate the initial XML, the TestUsers context token and the trailing XML. The result will be stored in the UserList workflow variable. Configure the action using the settings below.
Note: UserList is Nintex Single line text variable

b)Regular Expression - This action will further process the value in the UserList variable by replacing each semicolon with additional XML



c)Call web Service - To add  users into SP Group , configuration follows :




So Its done try and check it out........

Adding User to SP Group Using Nintex Dynamically

Requirement:
Adding user to SharePoint 2010 Group Dynamically Using Nintex


Solution:
Use usergroup.asmx web service as mentioned below:
VarLoginName , VarUser, Varemail are the variables which will hold User properties and can easily get using Query User Profile.