SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to create an item in a SharePoint list using Lists.UpdateListItems web service. I have created a batch method and populate it with these fields.

<Field Name="ContentType">Document</Field>
<Field Name="FileLeafRef">??????</Field>
<Field Name="Title">Doc1</Field>
<Field Name="LookupColumn"></Field>

I don't know how the FileLeafRef format looks like. when i write Doc1.txt for example, the service returns an error.

Any one has an idea.

Thank you for your help.

share|improve this question
Please, do not double post (…) – Dribbel Aug 19 '11 at 14:00
up vote 0 down vote accepted

The FileLeafRef must contain the full path to the document.

But keep in mind that creating new documents in a doclib using Lists.UpdateListItems is not possible ([citation needed] && as far as i know)

share|improve this answer
Are you sure that the FileLeafRef must contain the full path of the document? Can you provide me a link that describes and explains the FileLeafRef field? – user3470 Aug 19 '11 at 18:55
Hmmmz, The examples I found use FileRef instead of FileLeafRef. The examples on MSDN use it:… and here also the full path is used:… – Dribbel Aug 19 '11 at 19:12

Maybe im wrong here, but i thought FileLeafRef only was used when query for items and not needed when creating them.

share|improve this answer
I need to set the item name. what field type should i choose? – user3470 Aug 19 '11 at 7:16
What do you mean with the item name, the Title? Check out:… maybe its to some help :) – Anders Aune Aug 19 '11 at 7:23
No i need the name that is displayed when the user view the list. If i don't set it the created item name will be his id plus underscore dot three zeros (ex: 99_.000) and the display will be 99_ – user3470 Aug 19 '11 at 7:29
The document name yes, now im following. If i remember correctly the internal name is BaseName for the Name field – Anders Aune Aug 19 '11 at 7:43
I tried it and got this error: 0x80070057 Bad parameter passed to Web Server Extensions. Check the information you entered and try again. – user3470 Aug 19 '11 at 7:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.