码迷,mamicode.com
首页 > 其他好文 > 详细

Xrm.Page.data.entity Properties and Methods

时间:2014-08-30 07:41:59      阅读:310      评论:0      收藏:0      [点我收藏+]

标签:xrm.page.data.entity   crmjs开发   crm自定义开发   crm开发   crm   

Xrm.Page.data.entity Properties and Methods

Xrm.Page.data.entity 属性和方法

attributes

   The collection of attributes for the entity.
   实体entity的属性的集合
 
getDataXml

   Returns a string representing the xml that will be sent to the server when the record is saved
   当一个记录被保存的时候,返回将要发生到服务器的xml数据
  
getEntityName

   Returns a string representing the logical name of the entity for the record
   返回string类型,实体entity的逻辑名称
 
getId

   Returns a string representing the GUID id value for the record
   返回string类型,返回当前记录的guid
  
getIsDirty

   Returns a Boolean value that indicates if any fields in the form have been modified
   返回bool类型,如果在窗体上面的任何字段发生的更改,就返回bool
  
OnSave

   Use the addOnSave and removeOnSave methods to add or remove event handlers to the save event
   使用addOnSave和removeOnSave事件,当发生保存的时候,执行操作
  
getPrimaryAttributeValue

   Gets a string for the value of the primary attribute of the entity
   返回string类型,实体的主字段名称
  
save

   Saves the record with the options to close the form or open a new form after the save is completed
   保存记录,有关闭窗体和打开新建记录的选择方式
  
 
 
Lookup control methods and events
查找字段的方法和事件

Xrm.Page.getControl(arg).addCustomFilter(filter, entityLogicaName)

Use add additional filters to the results displayed in the lookup.
Each filter will be combined with any previously added filters as an ‘AND’ condition.
添加查询条件,添加的条件用and连接

例子:
<filter type="and">
 <condition attribute="address1_city" operator="eq" value="Redmond" />
</filter>

Xrm.Page.getControl(arg).addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, isDefault)

Adds a new view for the lookup dialog box
添加一个新的查询窗体

Xrm.Page.getControl(arg).getDefaultView()

Returns the Id value of the default lookup dialog view
返回默认视图的guid

Xrm.Page.getControl(arg).setDefaultView(viewGuid)

Sets the default view for the lookup control dialog
设置查找控件的默认视图

Xrm.Page.getControl(arg).addPreSearch(handler)

Use this method to apply changes to lookups based on values current just as the user is about to view results for the lookup
添加查询事件之前的方法


Xrm.Page.getControl(arg).removePreSearch(handler)

Use this method to remove event handler functions that have previously been set for the PreSearch event
删除用PreSearch添加的操作
 

Xrm.Page.data.entity Properties and Methods

标签:xrm.page.data.entity   crmjs开发   crm自定义开发   crm开发   crm   

原文地址:http://blog.csdn.net/y_f123/article/details/38941319

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!