我正在尝试更新 SharePoint 列表中的状态。做了一些谷歌搜索,发现大多数示例都使用 ID 列来定位列表项,但我的列表没有这样的列,只有 Windows 登录和状态列。我想知道 XML 会是什么样子?
这是我想出的,但它不起作用:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>SPUsers</listName>
<updates>
<Batch PreCalc='TRUE' OnError='Continue'>
<Method ID="1" Cmd="Update">
<Field Name="ID">ABC</Field>
<Field Name="ItemStatus">Completed?ID=ABC</Field>
</Method>
</Batch>
</updates>
</UpdateListItems>
</soapenv:Body>
</soapenv:Envelope>
这是结果:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<UpdateListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<UpdateListItemsResult>
<Results>
<Result ID="1,Update">
<ErrorCode>0x80004005</ErrorCode>
<ErrorText>Cannot complete this action. Please try again.</ErrorText>
</Result>
</Results>
</UpdateListItemsResult>
</UpdateListItemsResponse>
</soap:Body>
</soap:Envelope>
知道出了什么问题吗?
谢谢你。