标签:
只要是用AIF Customer/Vendor service在AX里create/update customers/vendors,都要涉及到global address book。因此了解这个feature是很重要的。
Partial Data model of Address Book:
主要介绍一些组成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.
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,
3. When we’re trying to link an address with contacts to a Party, then the structure will be,
例如: 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’
DirPartyContactInfoView(Party contact): This view gives us a list of all contacts that are linked to a Party.
例如,选出一个Customer(Party)的所有联系信息。
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,
总结:
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的逻辑。
标签:
原文地址:http://www.cnblogs.com/ivyliu/p/3748468.html