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.
Cheers !
Thank you for that post! Very helpful!
ReplyDeleteglad that it helped you :)
Deleteit will only move or copies jut one. We need to copy all the items.
DeleteHello Rajdeep,
ReplyDeletedo you know if it is possible to get the ID of the element that was created, like with the web service output in XML or some other way (but in the same workflow/action)?
I haven't tried this, but I think using the same web service it should be possible. However, I would use a pause activity after the list item is created to ensure the ID is generated and ready for retrieval.
Delete