Sharepoint- Insert into a subfolder of a list

How to insert a list item into a folder in a list using a list of web services (UpdateListItem).

The wand in the folder will be something like this. [My site]> [My list]> [My folder]

I tried with CAML as follows:

 <Batch PreCalc="TRUE"
 OnError="Continue"
 RootFolder="/Lists/MyList/MySubFolder">
 <Method ID="1" Cmd="New">
       <Field Name="Title">Gent</Field>
       <Field Name="PostalCode">9000</Field>
       <Field Name="TelephoneZone">09</Field>   
</Method> </Batch>

But unsuccessfully.

I get a response: Invalid URL value.
** If I remove the RootFolder attribute, it works fine, but the item is inserted outside the folder.

+3
source share
3 answers

The problem is resolved.

"RootFolderAttribute" should not be RootFolder = "/ Lists / MyList / MySubFolder" but "/ sites / MySite / Lists / MyList / MySubfolder"

This could not be resolved thanks to a tool called u2u CAML Query Builder.

+4
source

, ?

0

If you can deploy the code to the server, I would drop my own web service that does the job. Thus, you get access to the entire object model.

0
source

Source: https://habr.com/ru/post/1710278/


All Articles