I'm seeing some strange behavior when using the SharePoint Lists web service while trying to update a document in a document library. I successfully use the Copy web service to upload the file (from a byte stream in my application's code) with some meta-data. However, some meta-data fields don't seem to "stick" in that scenario. Specifically fields which are multi-value lookups to another list.
So after uploading the file, I use the Lists web service to update its meta-data. The query I'm using is this:
<Batch> <Method ID="1" Cmd="Update"> <Field Name="ID">47</Field> <Field Name="Client_Lookup">16;#Test Client</Field> <Field Name="Liaison_Lookup">25;#Test Liaison</Field> <Field Name="FileRef">http://testserver/CRA_BATCHREPORTS/2013-02-Batch1-Report1…</Field> <Field Name="MONTH">2</Field> <Field Name="YEAR">2013</Field> <Field Name="Report_x0020_Type">Configured</Field> </Method> </Batch>
The intent here specifically is to update those Client_Lookup and Liaison_Lookup fields. That succeeds in and of itself. However, this is resulting in some odd side-effects. The other fields in the query (Month, Year, Report Type) are being reset to default values rather than the explicit values being set here (whether I include them in the update query or not). Additionally, another meta-data field (DOCID) is being updated from the value it was set in the Copy service (1, which is the item's ID in my web application) to the ID value of the item (47, which is the item's ID in SharePoint).
Has anybody seen behavior like this before and can offer any suggestions?