Translate

Showing posts with label call web service. Show all posts
Showing posts with label call web service. Show all posts

Monday, September 16, 2013

Nintex Workflow: Create List Item using Web Service. Useful for accessing and creating list at different levels of site.

Solution: I got one requirement to create list item at different site level using OOB feature of SharePoint. We couldn’t use SharePoint Designer because that is blocked, SharePoint OOB feature won’t allow you to create this. We have Nintex workflow which allows you to do this using the web service activity.

Step 1: At your source list create a workflow with one Build String activity and add the below code and store it in a variable.

<Batch OnError="Continue" ListVersion="1" >
   <Method ID="1" Cmd="New">
      <Field Name='ID'>1</Field>
      <Field Name="FirstName">TestABC</Field>
   </Method>
</Batch>
 












Step 2: Add the call web service activity. In the URL section add the /_vti_bin/lists.asmx web service of the destination site. Select UpdateListItems from the web method. Put the destination list name. Add the variable used on the previous activity at the updates(xml) section.

 Your source list workflow should look like below.



 Now you are good to go, just make sure on the url you have a list DestinationTest and that contains a column FirstName.


Cheers !