Well I hope everyone is having a fine week so far. Oh Wednesdays, the furthermost point between two weekends. It's a day of great productivity, as we push towards that glimpse, and hope for our Saturday and Sunday.

To help you out during the middle of this week, I thought it was time we spent a little focus around the changes in AX 2012 around extended data types, and specifically around understanding the way relations are made.

First off the bat, lets look to the Extended Data Types in the Database [AX 2012] In this article on MSDN, Microsoft points out some highlights about EDT's in AX 2012, specifically, highlighted is:

"Starting in Microsoft Dynamics AX 2012, you can no longer define relations under an EDT element in the AOT. If your system has any EDT relations, you should migrate those relations to the appropriate table elements. For more information, see EDT Relation Migration Tool."

On this same page, before we move forward in looking at what this means, there is a link on How to: add Dimensions. Make sure to NOT follow that link. It has not been updated yet for AX 2012.

Now with that aside, lets look at what this means for AX 2012. Back in AX 2009, relations would exist, on the EDT, for example, linking a specific EDT, to a reference table, in which the EDT was the primary key.

Now in AX 2012, this has moved to the table relations level. So lets take the following for example. If I have a Table, and as part of it, I would like to have an EDT, that is controlled and is referenced to an underlying table itself. This EDT then, and the field that it represents would be a foreign key for this new table we are building.

To help set this straight, lets look at the following.:

With this, we have the relationship, that now lives at the Primary Table, that has a Foreign Key, represented by the EDT. The EDT, in turn is the Primary Key, for the underlying reference table.

Moving ahead, lets see this in action, with a simple example. To see this in action, we will need a project, an Extended Datatype, or EDT, as well as our reference and Primary table.

You will notice that I have already added the EDT, as the PrimaryField to the idbReference Table node. Also, I've created a Primary Index, and placed that field in the Primary Index, as set the index to not allow duplicates.

Now that we have this base, we must move to the EDT, and add the idbReference, as a table reference to the EDT. This does not set the relation, instead it is the primary reference for the EDT.

After this, we add the EDT, to the Primary table, which I've called ForeignKeyField, in order to help understand the point.

Now that we have this, we next have to create our relation, from the Primary table to the reference table. We do this, and on the properties of the relation, we set that it's an EDTRelation = Yes.

In doing this, we can now set the relation, via a Normal Relation Option, from our Primary Table, to our Reference Table field. In doing this, and because of the EDTRelation = Yes is true, we can now select what EDT should be used in this relation.

After this we end up, with our goal, of having correctly related reference data, from one table, as part of the record for another table.

Moving the relations to the table level makes correct sense. It's a change in how you've worked with AX in the past for this area, but it's a very good change. For example because of this table relations now support Dynamic Links, as well as unbound control lookups.

This is important to understand, for those people who are doing new custom development work, and also for those who are focused on upgrades. There is Whitepaper, for those looking to how best and tackle this for upgrades. You can find that white paper here: Migrating EDT Relations

Well I hope that on this fine Wednesday, you have a productive one, and hope that the above might come in handy, or better help your understanding of this topic, as it relates to new customization in AX 2012 as well as how this can impact and affect task when upgrading.

That's all for now, till next time!

http://community.dynamics.com/ax/b/brandongeorge/archive/2011/12/07/ax-2012-understanding-the-changes-to-table-relations.aspx

How to changes to Table & EDT Relations[AX2012]的更多相关文章

  1. How to add EDT relation table[AX2012]

    setp 1. First create New Edit. setp 2.Create New Table First Table Name is NParentRel then drag and ...

  2. AX7: HOW TO USE TABLE METHOD EXTENSION CLASS

    To create new methods on a table without customize you should use the Table method extension class. ...

  3. AX2012 DMF数据导入的问题

    由于AX2012的数据结构比较复杂,通过Excel直接导入表的方式很多数据已经难以导入,比如物料信息,2009只需要导入InventTable,InventTableModule和InventItem ...

  4. [AX]AX2012 Number sequence framework :(三)再谈Number sequence

    AX2012的number sequence framework中引入了两个Scope和segment两个概念,它们的具体作用从下面序列的例子说起. 法国/中国的法律要求财务凭证的Journal nu ...

  5. [AX2012 R3]关于Alerts

    AX2012提供两种类型的Alert,Change-based alert和Due-date-based alert,前者用于在对新建记录.删除记录.记录的某个指定字段被改变的时候发出提醒,后者则是用 ...

  6. AX2012 R3升级CU8的一些错误

    AX2012 R3安装升级包CU8后进入系统,系统会提示打开软件升级清单“Software update checklist”,清单列出了升级要做的一系列动作. 在进行到编译应用时“Compile a ...

  7. How to create Lookup Worker Filtered by Legal Entity[AX2012]

    1. Add a new method in hcmWorker table, and add this script : public static client void lookupWorker ...

  8. Yii AR中处理多表关联的relations配置

    关系型 Active Record官方文档中指出: 两张表之间的关联是根据外键来的,但是这种外键关联虽然在数据容错方面有益处,但是在性能上是个损伤,所以,一般是不定义外键的. 这种情况下,他们之间的关 ...

  9. [AX2012]关于财务默认维度

    和以前的版本一样,AX2012中很多地方都使用财务维度,比如客户.销售订单.销售订单行等,根据相应的财务维度设置,生成的相应财务分录将带有财务维度,方便后续对财务分录交易的分析.下图是在客户记录上设置 ...

随机推荐

  1. HF Code Designer 代码生成器

    最近忙于项目和平台开发好久没写博客了,今天把最近的一个项目总结和大家分项一下. 在平台开发的过程中,代码生成器是必不可少的,Net领域的代码生成器比较多,以前用动软的,最早的那个版本还是开源,自己写了 ...

  2. 【Shell脚本学习5】第一个Shell脚本

    打开文本编辑器,新建一个文件,扩展名为sh(sh代表shell),扩展名并不影响脚本执行,见名知意就好,如果你用php写shell 脚本,扩展名就用php好了. 输入一些代码: #!/bin/bash ...

  3. OC之protocol监听器的实现

    画图 图解 代码 总结 一.画图 本人画了一个图(字体和画图水平请忽略) 二.图解 1.首先我们上边是一个按钮的类,按钮当中包括了一条线,这个线是什么呢? 其实难理解就难理解到这条线上了 1⃣️这条线 ...

  4. cannot find module 'cordova-common'

    解决办法,重新安装cordova npm install -g cordova

  5. 转: 微博的多机房部署的实践(from infoq)

    转:  http://www.infoq.com/cn/articles/weibo-multi-idc-architecture 在国内网络环境下,单机房的可靠性无法满足大型互联网服务的要求,如机房 ...

  6. BZOJ 2456

    Description 给你一个n个数的数列,其中某个数出现了超过n div 2次即众数,请你找出那个数. Input 第1行一个正整数n.第2行n个正整数用空格隔开. Output 一行一个正整数表 ...

  7. php学习笔记6--php中的文件包含 include,require,include_once,require_once

    php中的文件包含 include,require,include_once,require_once 文件包含:是指将一个文件的内容包含进另外一个文件,有利于代码的复用等.php中文件包含指令有4个 ...

  8. 增强for循环用法___ArrayList数组实现使用下标最好,LinkedList使用增强型的(转载)

    总结: 1.For-Each循环的缺点:丢掉了索引信息. 当遍历集合或数组时,如果需要访问集合或数组的下标,那么最好使用旧式的方式来实现循环或遍历,而不要使用增强的for循环,因为它丢失了下标信息. ...

  9. ASP.NET jquery ajax传递参数

    第一种:GET传递 前台 ajax   GET 传递 :即在请求的地址后面加上参数,URL地址长度有显示,安全性低 后台接收:Request.QueryString[“参数名字”]! 例如: func ...

  10. 【学习笔记】【C语言】变量类型

    根据变量的作用域,可以分为: 1.局部变量: 1> 定义:在函数(代码块)内部定义的变量(包括函数的形参) 2> 作用域:从定义变量的那一行开始,一直到代码块结束 3> 生命周期:从 ...