0

我想使用给定的输入更改 SharePoint 列表项的属性。我使用了文档并得到了这个,但我不确定我做错了什么。可能有一些完全错误的东西,因为我没有太多经验。

$().SPServices(
        {
            operation: "UpdateListItems",
            async: false,
            listName: "TechInv",
            Number: itemNumber,
            valuepairs: [[property, replacement]],
            completefunc: function(xData, Status) {
                // ...
            }
     });
4

3 回答 3

1

The SPServices plugin is well documented. In your case, it seems that you are missing the item ID.

于 2013-10-11T16:52:09.750 回答
0
$().SPServices(
    {
        operation: "UpdateListItems",
        async: false,
        listName: "TechInv",
        ID: itemNumber,
        valuepairs: [[property, replacement]],
        completefunc: function(xData, Status) {
            // ...
        }
 });

ID是变化,它应该工作。

于 2013-10-15T06:00:08.507 回答
0

您可以使用 Firebug(Firefox 的插件)或浏览器的 Web 工具栏来查看发送到服务器的查询以及服务器返回的错误消息。这样您就可以更轻松地找到问题所在。在您的情况下,我认为您使用了“数字”而不是“ID”。

顺便说一句,我用 JavaScript 创建了一个 Sharepoint API,我认为它比 SPServices 更易于使用。它就在那里:SharepointPlus

于 2013-10-12T10:43:32.323 回答