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

时间: 2024-10-11 11:34:53

Xrm.Page.data.entity Properties and Methods的相关文章

Propagation of Visual Entity Properties Under Bandwidth Constraints

1. Introduction The Saga of Ryzom is a persistent massively-multiplayer online game (MMORPG) released in September 2004 throughout Europe and North America, localised in 3 languages so far. It has been developed by Nevrax since 2000, and was taken ov

Metadata file not found - Data.Entity.Model

错误 3 正在编译转换: 未能找到元数据文件“F:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\..\IDE\Microsoft.Data.Entity.Design.DatabaseGeneration.dll” E:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework

JavaScript Patterns 5.3 Private Properties and Methods

All object members are public in JavaScript. var myobj = { myprop : 1, getProp : function() { return this.myprop; } }; console.log(myobj.myprop); // `myprop` is publicly accessible console.log(myobj.getProp()); // getProp() is public too The same is

写一个system.data.entity的simpledatarepo,实现crudq这些功能,不需要引入entityframework,直接可以使用,用到objectset

note:you can delete reference of entityframework when using this classes.it`s just a simple repohelper.the code below can also include a getpagedlist method when paging. have fun,it`s simple,just create edmx file from database.all one sentence.but wh

使用EF6.0出现:CS0029 无法将类型“System.Data.Entity.Core.Objects.ObjectContext”隐式转换为“System.Data.Objects.ObjectContext”错误

这是因为EF6.0重构了一些命名空间后,和VS原有的实体数据模型模板不一致了(ObjectContext context = ((IObjectContextAdapter)dataContext).ObjectContext;),只要把命名空间改一下就可以了,如下: 把using System.Data.Objects;改成using System.Data.Entity.Core.Objects;即可.

System.Data.Entity.Internal.AppConfig 类型初始值设定项引发异常

在一开始时将connectionStrings 写在了configSections之上如下图一示,结果抛出:“System.Data.Entity.Internal.AppConfig”的类型初始值设定项引发异常. 图一:最初配置 图二:抛出异常 解决方法,是将connectionStrings 写在了configSections之下,如图三 图三:调整后的配置

EntityFramework 找不到方法:“Void System.Data.Entity.DbModelBuilder.RegisterEntityType

问题原因,EF当前版本没有该方法,将EF版本升级即可. 1.packages.config <package id="EntityFramework" version="6.1.3" targetFramework="net40" /> 2.app.config <configSections> <!-- For more information on Entity Framework configuration,

关于System.Data.Entity.Core.MetadataException错误

发布ASP.NET MVC到IIS后出现错误: 1 System.Data.Entity.Core.MetadataException: Schema specified is not valid. Errors: 2 SysModel.ssdl(2,2) : error 0152: No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlClient'. Ma

EF生成 类型“System.Data.Entity.DbContext”在未被引用的程序集中定义

错误描述: 1 类型“System.Data.Entity.DbContext”在未被引用的程序集中定义.必须添加对程序集“EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089”的引用. D:\HF_Source\webapitest\test2\DFSoft.Plat.SQLServerDAL\BaseService\B_AgreementTypeDAL.cs 30 13 DFSof