以下是该方案:
function OpenLookup() {
var objectCode = "2";
var url = serverURL+"/_controls/lookup/lookupinfo.aspx? AllowFilterOff=1&DefaultType=1&DefaultViewId={A9AF0AB8-861D-4CFA-92A5- C6281FED7FAB}&DisableQuickFind=0&DisableViewPicker=0&LookupStyle=single&ShowNewButton=1&Show PropButton=1&browse=false¤tObjectType=2¤tid={7D2D14AE-7EE1-E311-B136- 00155D02101E}&objecttypes=1%2c2";
var lookUp = window.open(url, null, "width=500,resizable=1,height=400,menubar=0,status=1,location=0,toolbar=0,scrollbars=1", null);
if (lookUp != null) {
var selectedVal = lookUp.items[0].name;
}
}
当我解析结果对象lookUp
时,它没有任何变量items
。所以我无法在查找过滤器窗口中检索选定的值。
任何帮助都将不胜感激。
感谢。
答案 0 :(得分:0)
我是这样做的:
var UpdatedAccountId;
var UpdatedAccountName = "";
var lookUp = window.showModalDialog(url, "entity", "dialogwidth: 450; dialogheight: 300; resizable: yes");
var updated = JSON.parse(lookUp);
for (i = 0; i < updated.items.length; i++) {
if (updated.items[0].id != null)
{
UpdatedAccountId = updated.items[0].id;
}
if (updated.items[0].name != null)
{
UpdatedAccountName = updated.items[0].name;
}
}