Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UpdateListItems, FileRef, and error 0x81020018

142 views
Skip to first unread message

Andy

unread,
Dec 14, 2006, 3:55:44 PM12/14/06
to
Hi, why does a "FileRef" field that has the absolute URL to a
document have to be specified in addition to the ID field when updating
a document's properties using the UpdateListItems
webservice in Sharepoint?

Isn't the view attribute in the <BATCH> node, and the name of the
list that is passed into UpdateListItems, enough to identify where the
document being updated with the specified ID can be found?

In all the examples and help files I found in the SPS SDK, none of them
specify a requirement for FileRef being a mandatory field for an
update; in fact there are many examples in the SPS SDK that do updates
without using FileRef in their batch xml.

When I submit the following batch XML to UpdateListItems:

<Batch OnError="Continue"
ViewName="{2C7C9D0C-074E-4062-9B1B-541F8AE8407A}">
<Method ID="1" Cmd="Update">
<Field Name="ID">307</Field>
<Field Name="Document_x0020_Type">Resume</Field>
</Method>
</Batch>

I get the following result XML returned by UpdateListItems:

<Results xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<Result ID="1,Update">
<ErrorCode>0x81020018</ErrorCode>
<ErrorText>Invalid text value A text field contains invalid data.
Please check the value and try again.
</ErrorText>
</Result>
</Results>

Document_x0020_Type is a custom property we've added to sharepoint,
and ID 307 is a real ID of an existing word document within the
sharepoint document library specified in UpdateListItems. I suspect
the invalid data message is a reference to the missing FileRef field in
the batch xml.

Does anyone know what is going wrong, and what things might cause the
examples Microsoft provides in the SPS SDK to fail when the FileRef
field isn't specified, as depected in the SPS SDK code samples (for
example, the setup of the document libraries themselves)?

Andy

0 new messages