contentIFrame.Xrm.Page.getControl("new_chargegroup_r_pe").getAttribute().getValue()[0].id contentIFrame.Xrm.Page.getControl("new_chargegroup_r_pe").getAttribute().setValue() contentIFrame.Xrm.Page.getControl("new_chargegroup_r_pe").setDisabled(false); contentIFrame.Xrm.Page.getControl("new_chargegroup_r_pe").setDisabled(true); contentIFrame.Xrm.Page.data.entity.getId(); contentIFrame.Xrm.Page.data.entity.getEntityName(); contentIFrame.Xrm.Page.data.entity.save(); 打印lookup控件属性: var tmp=contentIFrame.Xrm.Page.getControl("new_approval_by").getAttribute().getValue()[0]; var msg=""; for(var t in tmp) { msg+=String.format("{0}:{1}",t,tmp[t]) } alert(msg); 打印datatime控件属性: var tmp=contentIFrame.Xrm.Page.getControl("createdon").getAttribute().getValue(); var msg=""; for(var i in tmp) { msg+=String.format("{0}:{1}/n",i,tmp[i]); } alert(msg);
抓取高级查找中的layout格式
contentIFrame.document.getElementsByName("LayoutXml")[0].value
显示在插件中抛出调试信息,类似JS中的Debugger命令 System.Diagnostics.Debugger.Launch();