Xrm.Page.data.entity Properties and Methods

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添加的操作
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值