BloggingAbout.NET
Thoughts of developers
Sharepoint Lists.asmx UpdateListItems: Root Folder

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 Fri, Mar 14 2008 10:53 AM by chilberto
Filed under:

Comments

Gluba wrote re: Sharepoint Lists.asmx UpdateListItems: Root Folder
on Fri, Sep 19 2008 12:55 PM

Do you have an ideas how to add items in a folder in sharepoint?

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Please add 5 and 1 and type the answer here:
Copyright © 2003-2010 BloggingAbout.NET