【发布时间】:2022-10-24 05:18:47
【问题描述】:
我想在 SharePoint Online 的模板脚本中提供一个带有查找字段的列表。 其中之一是“参与者名单”。在这个列表中,我想创建一个查找字段,它应该引用另一个列表中的“角色描述”字段。我不知道从哪里获得目标字段的 ID 以及如何正确构建 XML。
到目前为止,这是我的 JSON:
{
"verb": "createSPList",
"listName": "Project Participants interal and external",
"templateType": 100,
"subactions": [
{
"verb": "setDescription",
"description": "Participants who will be in the project"
},
{
"verb": "addSPLookupFieldXml",
"schemaXml": "<Field Type=\"Lookup\" DisplayName=\"Role Description\" Required=\"FALSE\" EnforceUniqueValues=\"FALSE\" ShowField=\"Title\" UnlimitedLengthInDocumentLibrary=\"FALSE\" RelationshipDeleteBehavior=\"None\" ID=\"{?????} StaticName=\"ProjectRoles\" Name=\"ProjectRoles\" />",
"targetListName": "Role Description",
"addToDefaultView": true
}
]
}
{
"verb": "createSPList",
"listName": "Role Description",
"templateType": 100,
"subactions": [
{
"verb": "setDescription",
"description": "All description of the roles will be stored here"
}
]
}
如果我先创建列表,我会在哪里获得字段的 ID。再次使用时 ID 会发生变化。
我希望你能帮助我解决这个问题。
此致
马蒂亚斯
【问题讨论】:
标签: json templates sharepoint-online