积极答复者
Lookup的欄位的屬性丟失回車換行符

问题
答案
-
lookup在crm中是个数组,应写为
var lookupItem = new Array;
// This gets the lookup for the attribute primarycontactid on the Account form.
lookupItem = crmForm.all.esp_shippingmarkid.DataValue;
// If there is data in the field, show it in a series of alerts.
if (lookupItem[0] != null)
{
// The text value of the lookup.
alert(lookupItem[0].name);显示的文字
// The GUID of the lookup.guid值
alert(lookupItem[0].id);
// The entity type name.对应实体的类型
alert(lookupItem[0].typename);
}- 已建议为答案 杭州-天天 2009年4月13日 5:01
- 已标记为答案 Batistuta CaiModerator 2009年4月13日 5:03
全部回复
-
在 onload里面写
var firstTab = document.getElementById("tab0");
var contents = firstTab.innerHTML;var url=window.location.href
var params=url.split('{');
var params1=params[1].split('}');
firstTab.innerHTML = '<img alt="Logo" src="/photopictures/'+params1[0]+'.jpg" height="140px" width="120" style="z-index: 100; left: 38px; position: absolute; top: 55px"><br/>' + contents;
看错了,你没有说这个问题...........不过也贴上 -
var oID=crmForm.all.esp_shippingmarkid; if (oID==null) { crmForm.all.esp_description.DataValue=""; return; } else { var getdesc=crmForm.all.esp_description; getdesc.DataValue=oID.items[0].keyValues.esp_description.value; }
這是我的代碼 。oID.items[0].keyValues.new_description中的
new_description沒有DataValue屬性.
韓建興 http://jamson.cnblogs.com -
lookup在crm中是个数组,应写为
var lookupItem = new Array;
// This gets the lookup for the attribute primarycontactid on the Account form.
lookupItem = crmForm.all.esp_shippingmarkid.DataValue;
// If there is data in the field, show it in a series of alerts.
if (lookupItem[0] != null)
{
// The text value of the lookup.
alert(lookupItem[0].name);显示的文字
// The GUID of the lookup.guid值
alert(lookupItem[0].id);
// The entity type name.对应实体的类型
alert(lookupItem[0].typename);
}- 已建议为答案 杭州-天天 2009年4月13日 5:01
- 已标记为答案 Batistuta CaiModerator 2009年4月13日 5:03