Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何更新没有ID列的SharePoint列表项_Sharepoint_Splistitem - Fatal编程技术网

如何更新没有ID列的SharePoint列表项

如何更新没有ID列的SharePoint列表项,sharepoint,splistitem,Sharepoint,Splistitem,我正在尝试更新SharePoint列表中的状态文件。做了一些谷歌搜索,发现大多数示例都使用ID列来定位列表项,但我的列表没有这样的列,只有windows登录和状态列。我想知道XML是什么样的 这是我想出来的,但它不起作用: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="htt

我正在尝试更新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>

斯普瑟斯
基础知识
已完成?ID=ABC
结果是:

<?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>

0x80004005
无法完成此操作。请再试一次。
知道哪里出了问题吗


谢谢。

我相信SharePoint中的所有列表项都会自动生成ID。我会使用列表视图或拉动列表项以查看是否存在ID

我相信SharePoint中的所有列表项都会自动生成ID。我会使用列表视图或拉动列表项以查看是否存在ID

SharePoint将自动生成列表项ID,默认视图不显示ID字段,您可以转到“列表视图设置”显示该字段,以便了解ID


SharePoint将自动生成列表项ID,默认视图不显示ID字段,您可以转到“列表视图设置”显示该字段,以便知道ID


谢谢,如果我想更新列表项,我在哪里可以获得ID但不显示在视图上?我想出来了,每个列表项都有一个名为ows\u ID的默认属性。所以我只需要获取该ID并将其包括在内,SharePoint列表将得到更新。谢谢。谢谢,如果我想更新列表项,我在哪里可以获得ID但不显示在视图上?我想,每个列表项都有一个名为ows_ID的默认属性。所以我只需要获取该ID并将其包括在内,SharePoint列表将得到更新。非常感谢。