【发布时间】:2019-06-09 13:05:50
【问题描述】:
我正在尝试使用 JSON 格式在电子邮件中包含指向特定 SharePoint 列表项的链接,但 URL 包含空格,我似乎无法将其包含在超链接中。
我尝试使用 "%20" 以及 "x0020" 代替空格, 但这只是读作空格。
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"children": [
{
"elmType": "span",
"style": {
"padding-right": "8px"
},
"txtContent": "@currentField.title"
},
{
"elmType": "a",
"attributes": {
"iconName": "Mail",
"class": "sp-field-quickActions",
"href": {
"operator": "+",
"operands": [
"mailto:",
"@currentField.email",
"?subject=Task status&body=Hi ","@currentField.title",", Please see below link to a Shared Services Team Task which requires your attention.\r\n\r\n---\r\n",
"\r\nClick this link for more info. https://MyCompany.sharepoint.com/sites/SharedServicesDepartment/Lists/Task Management Register/DispForm.aspx?ID=",
"[$ID]"
]
}
}
}
]
}
我想要实现的是一个超链接
但它会在第一个空格处切断超链接,并将最后一部分保留为文本。
https://MyCompany.sharepoint.com/sites/SharedServicesDepartment/Lists/Task 管理寄存器/DispForm.aspx?ID=
【问题讨论】:
-
JSON 是如何生成的?如果是通过程序,请分享您尝试过的方法来解决您的问题。
标签: json sharepoint