无法在 javascript 中使用 COM 加载 "multiple line of text" 的值
Cannot load value of "multiple line of text" using COM in javascript
列名是"Dialog Box"。我试过这个
var context = new SP.ClientContext.get_current();
var targetList = context.get_web().get_lists().getByTitle("myList");
var targetListItem = targetList.getItemById(_spGetQueryParam('id'));
context.load(targetListItem, "Dialog Box");
context.executeQueryAsync(Function.createDelegate(this, onStatusQuerySucceeded), Function.createDelegate(this, onStatusQueryFailed));
function onStatusQuerySucceeded() {
alert(targetListItem.get_item("Dialog Box"));
}
function onStatusQueryFailed(sender, args) {
alert("failed Dialog Box");
}
"Dialog Box" 是标题,你应该尝试使用内部名称。您可以使用 SharePoint 管理器获取列的内部名称。但是要确保创建没有 space 且名称不存在的新列并尝试获取价值。没有 space 的列名如果不存在则具有相同的内部名称。
列名是"Dialog Box"。我试过这个
var context = new SP.ClientContext.get_current();
var targetList = context.get_web().get_lists().getByTitle("myList");
var targetListItem = targetList.getItemById(_spGetQueryParam('id'));
context.load(targetListItem, "Dialog Box");
context.executeQueryAsync(Function.createDelegate(this, onStatusQuerySucceeded), Function.createDelegate(this, onStatusQueryFailed));
function onStatusQuerySucceeded() {
alert(targetListItem.get_item("Dialog Box"));
}
function onStatusQueryFailed(sender, args) {
alert("failed Dialog Box");
}
"Dialog Box" 是标题,你应该尝试使用内部名称。您可以使用 SharePoint 管理器获取列的内部名称。但是要确保创建没有 space 且名称不存在的新列并尝试获取价值。没有 space 的列名如果不存在则具有相同的内部名称。