确定SharePoint 2013列表中列的字段ID

时间:2015-09-23 21:08:23

标签: sharepoint sharepoint-2013

我正在尝试使用SPServices UpdateList操作,我需要我想要从默认只读设置更改的列的字段ID。如何确定字段标记设置?

//Make the author field editable
var author = "<Fields><Method ID='1'><Field /*What stuff goes here?*/ ReadOnly='FALSE' /></Method></Fields>";
$().SPServices({
    operation: "UpdateList",
    listName: "Requests",
    listProperties:"",
    updateFields: author,
    newFields: "",
    deleteFields: "",
    listVersion: "",
    async: false,
    completefunc: function (xData, Status){  
    }
});

1 个答案:

答案 0 :(得分:4)

我通过这样做找到了要放在字段标记中的内容:

  1. 获取GUID of the list
  2. 导航到此自定义网址: HTTP:// <强> [yoursharepointsite] /_vti_bin/owssvr.dll?Cmd=ExportList&List=的 [yourGUID]
  3. 执行control-F搜索您的列名,并且您拥有包含所有默认参数的字段标记!
  4. 对于上述问题,标签是:

    <Field ID="{1lc5j379-ec7e-42a8-901d-j85a3881c0b8}" ColName="tp_Author" RowOrdinal="0" ReadOnly="FALSE" Type="User" List="UserInfo" Name="Author" DisplayName="Created By" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Author" FromBaseType="TRUE" Version="7" />