Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Difference between Lists and Document Library

  Asked By: Stewart    Date: Oct 11    Category: Sharepoint    Views: 4353

I am trying to update properties of a document in a document library
using the lists web service. I can insert,update and delete items in
a list using the updatelistiems method by passing the following XML.
<Method ID="1" Cmd="Update"><Field Name="ID">1</Field><Field

If I send it to a document library and reference a property of the
document it returns <ErrorCode>0x81020014</ErrorCode> with a no such
field name reference. I know that the names referenced are accurate.
I am assuming that their is a mandatory field that has to be
referenced. Anyone know which one?



3 Answers Found

Answer #1    Answered By: Stephon Valentine     Answered On: Oct 11

I think that in addition to the XML you have, you need the following:

Name="FileRef">server/.../Field>" target="_blank" rel="nofollow">server/.../Field>

So that your complete XML is:

<Method ID="1" Cmd="Update">
<Field Name="ID">1</Field>
<Field Name="Name">UpdateName</Field>
Name="FileRef">server/.../Field>" target="_blank" rel="nofollow">server/.../Field>


You would think that the list  name and ID would be sufficient to
identify the document. Apparently not.

Answer #2    Answered By: Leif Cardenas     Answered On: Oct 11

I was just in the processes of making your recommended change and
found that the "FileRef" is the necessary piece to include. It took
me a day to figure this out, which really infuriates me. On the
other hand, I am thinking of having a smoke ( and I don't smoke).

I know how to upload a file to the document  library, but not in this
batch command. Do you? Otherwise, I am going to upload the
document, then find it in the list  and attach the properties  I need.

Answer #3    Answered By: Jasper Hatfield     Answered On: Oct 11

Using FrontPage RPCs you can can put a doc and set its metadata.
There is a GotDotNet sample called FPSEPublish. One trip up was the
format for the metadata. It is like:
MyProperty;SW|myvalue;NextProp;SW|nextvalue;aDateProperty;TR|27 Jul
2005 20:57:40 -0000

Didn't find what you were looking for? Find more on Difference between Lists and Document Library Or get search suggestion and latest updates.

Related Topics:



Related Post