Geeks With Blogs
Jeffrey's Blog .Net Developer

The RootFolder attribute on the Batch element controls the folder of the item. This can be used to access a sub-folder. The structure is Lists/list/folder where folder is optional.

For example, if the list being updated is Contacts and there are two sub-folders Work and Personal. To update an item in the Contacts list:

<Batch OnError="Continue" PreCalc="TRUE" ListVersion="0" RootFolder="/Lists/Contacts">
<Method ID="1" Cmd="Update">
<Field Name="ID">47821</Field>
<Field Name="RefID">479485</Field>
<Field Name="CustomerNumber">59613</Field>
</Batch>

And to update an item in the Work folder:

<Batch OnError="Continue" PreCalc="TRUE" ListVersion="0" RootFolder="/Lists/Contacts/Work">
<Method ID="1" Cmd="Update">
<Field Name="ID">47821</Field>
<Field Name="RefID">479485</Field>
<Field Name="CustomerNumber">59613</Field>
</Batch>

Posted on Friday, March 14, 2008 11:51 AM Sharepoint | Back to top


Comments on this post: Sharepoint Lists.asmx UpdateListItems: Root Folder

# re: Sharepoint Lists.asmx UpdateListItems: Root Folder
Requesting Gravatar...
I ran into a problem where I needed the full site. Finally found the answer here:
http://social.msdn.microsoft.com/forums/en-US/sharepointdevelopment/thread/987f27e9-98ef-4db6-9615-225a1bf7c50a
Left by Joshua Stewardson on Sep 17, 2009 8:39 PM

# re: Sharepoint Lists.asmx UpdateListItems: Root Folder
Requesting Gravatar...
Thank you very much!
Your article is very useful!
Left by tiffany on Jan 25, 2010 11:43 PM

Your comment:
 (will show your gravatar)


Copyright © Chilberto | Powered by: GeeksWithBlogs.net