I have a scenario where I need to update a list item, but I don't know the internal ID of the list item - hence the following won't work for me:

batchElement.InnerXml = "<Method ID='1' Cmd='Update'>" +
            "<Field Name='ID'>" + id + "</Field>" + 
            "<Field Name='DeliveryStatus'>" + newStatus.ToString() + "</Field></Method>";

Instead I have another field in the list called ProcessID:

So I would like to update the delivery status where ProcessID = X

Is this possible using SharePoint web services.

One solution I was thinking of is to first do a select for the ID based on the ProcessID - then update based on this ID, but this seems like a crazy solution, surely the inventors of MOSS CAML would have provided a way to update a list item by some means of a where clause, or using another field for filtration rather than just plain old ID?


2 Answers 2


I suspect that you're crazy solution is the right one - select for the items to get the IDs, then update.

It's not much different to uploading a document - that can involve an HTTP PUT, setting the metadata, and then checking the item in - that's 3 HTTP requests for what I though should be 1...


I think you are missing a few nodes. You should need the following:

<updates><Batch OnError='Continue'>{CAML}</Batch></updates>
  • @Mike - thanks my batch element contains this, but I am in search of a way to update a list item based on a field other than id, any idea how this is done?
    – user879
    Jun 4, 2010 at 3:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.