Using SharePoint's lists.asmx and UpdateListItems to delete an item by Guid or UniqueId
I am trying to call the lists.asmx UpdateListItems() to delete a list item by unique id or guid. The following batch xml fails with "Invalid URL Parameter. The URL provided contains an invalid Command or Value. Please check the URL again".
<Batch OnError="Continue" ListVersion="1" ViewName="">
<Method ID="1" Cmd="Delete">
<Field Name="Guid">7be4a863ce-08de-4506-9c69-400749860e76</Field>
</Method>
</Batch>
In addition, I have tried with and without enclosing "{}", UrlEncoding, using U开发者_JAVA技巧niqueId instead of Guid, prefixing the guid with "[id];#", etc. but to no avail.
Using the ID will work, but I would prefer using the Guid if possible:
<Batch OnError="Continue" ListVersion="1" ViewName="">
<Method ID="1" Cmd="Delete">
<Field Name="ID">29</Field>
</Method>
</Batch>
Anyone have any ideas, or is this not possible using the UniqueID or Guid?
From the documentation, they only give an example using ID... which leads me to believe it probably will not work with anything else.
精彩评论