zoukankan      html  css  js  c++  java
  • A peek at Address Book in AX

    只要是用AIF Customer/Vendor service在AX里create/update customers/vendors,都要涉及到global address book。因此了解这个feature是很重要的。

    Partial Data model of Address Book:

    clip_image001

    主要介绍一些组成Address book framework的Tables/Views.

    DirPartyTable(Party): 两种类型:个体(Customer/Vendor), 组织(Organization)

    DirPartyLocation(Party Location): This is linked to party table and location table through its 2 fields: Party and Location.

    They are both FK to RecIds on those tables.

    clip_image002

    LogisticsLocation (Location):

    This is the link between an physical address or a contact(email, phone,fax...) with Party(Customer/Vendor).

    1. Contacts are not directly linked to Address. Rather they are very indirectly linked to Address through a shared location. 意思就是多个contacts地址共享一个location。

    2. When we are trying to link a contact directly with a party, then the structure will be,

    • Location
    • Bunch of Contacts which point to this location

    3. When we’re trying to link an address with contacts to a Party, then the structure will be,

    • Location(A)
    • Only one Address liked to this Location
    • Another location (B) with ParentLocation set to above Location A
    • Bunch of Contacts liked to the Location B

    例如: Contact 1 --link to Address 1----link to Party 1

    Address 1 ----Location A

    Contact 1-----Location B, ParentLocation = Location A

    LogisticsPostalAddress(Address): This table stores the actual physical postal address.  (Note: Postal address 有两个重要的字段:ValidFrom和 ValidTo。这表示可以有多个物理地址.)

    LogisticsElectronicAddress(Contact):

    This table stores all the contacts. Contacts are of 2 types

    1. Contacts linked to Customer/Vendor directly

    2. Contacts linked to a postal address

    DirPartyPostalAddressView(Party address): This view gives us a list of all addresses that are linked to a Party.

    例如,选出一个Customer(Party)的所有物理地址,

    select * from DirPartyPostalAddressView a                                                            

    join CustTable b on a.Party = b.Party where b.AccountNum = ‘2014’

    clip_image003

    DirPartyContactInfoView(Party contact): This view gives us a list of all contacts that are linked to a Party.

    例如,选出一个Customer(Party)的所有联系信息。

    clip_image004

    LogisticsLocationAddressView( All postal address): This view gives us a list of addresses of all location

    LogisticsContactInfoView(All contact info): This view gives us a list of contact info of all location

    最后一个例子,选出一个Customer上关联的所有Postal Address上的所有Contact Info,

    clip_image005

    总结:

    1. 一个完整的ER如下:

    DirPartyTable -- DirPerson(DirOrganization) -- DirPartyLocation -- DirPartryLocationRole

      |

      LogisticsLocation -- one DirPostalAddress

      LogisticsLocation -- one DirPostalAddress

      LogisticsLocation -- multiple DirElectronicAddress -- LogisticsLocationRole

    2. 现有AIF Customer service不是一个干净的document service, 因为它的query里用的是View(不能create/update),AXd** class里重写了create/update address的逻辑。

  • 相关阅读:
    编译原理:正则表达式
    编译原理:基于状态转换图识别for语句
    汇编小笔记
    win10汇编如何debug(小白向)
    nodejs模块引用
    nodejs环境设置理解
    分享几个看上去很酷炫的运算
    JavaScript数据结构 (手打代码)
    爬取煎蛋XXOO妹子图片
    Python Selenium官方文档阅读笔记
  • 原文地址:https://www.cnblogs.com/ivyliu/p/3748468.html
Copyright © 2011-2022 走看看