Dynamics CRM 2011 表单Debug常用命令

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();
显示系统详细错误
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
     <behaviors>
       <serviceBehaviors>
         <behavior>
           <serviceDebug includeExceptionDetailInFaults="True"/>
         </behavior>
       </serviceBehaviors>
     </behaviors>
  </system.serviceModel>

Passing Parameters to HTML Web Resources

Parameter Name Description

typename

Entity Name

The name of the entity.

type

Entity Type Code

An integer that uniquely identifies the entity in a specific organization.

id

Object GUID

The GUID that represents a record.

orgname

Organization Name

The unique name of the organization.

userlcid

User Language Code

The language code identifier being used by the current user.

orglcid

Organization Language Code

The language code identifier that represents the base language for the organization.

data

Optional Data Parameter

An optional value that may be passed.

formid

Form Id

The GUID that represents a form id.

pagemode

For internal use only.

security

For internal use only.

tabSet

For internal use only.

 



 
 


你可能感兴趣的:(crm)