现在的位置: 首页 > 综合 > 正文

Dynamics CRM 2011 表单Debug常用命令

2013年10月01日 ⁄ 综合 ⁄ 共 957字 ⁄ 字号 评论关闭
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();

抱歉!评论已关闭.