首页 > 其他 > 详细

Microsoft Dynamics AX 2012: How to get Company,Customer and Vendor address in AX 2012

时间:2015-07-20 12:15:24      阅读:308      评论:0      收藏:0      [点我收藏+]

Scenario:  “How to get Addresses ofCustomer, Vendor and Company

1)      First we need to identify which table store address of each entity

Table : LogisticsPostalAddress  : In Dynamics AX 2012 this is the main table which stores every address of each entity(customer/vendor…).This table contains fields like city,country,state,zipCode etc. required for the address.

a)      Customer/Vendor  address

Assume that we have the customer with CustAccount = 1103 and has the address and infact which is the primary/main address.(below)

技术分享

Now if we want to get this specific customer address we can use the following code.

技术分享

Simliar for the Vendor

技术分享

Use following code:

技术分享

a)      Company Address

For the Company address we can use the CompnayInfo table to get first the company and then find its address in LogisticsPostalAddress table.

We can find the LogisticsPostalAddress of the current company by Location .

This line give the location of the current company

Now get the logisticsPostalAddress reference we can use and find the address

So,

技术分享

 

技术分享

 

 

 

  reference from :https://amazingax.wordpress.com/2014/01/28/microsoft-dynamics-ax-2012-how-to-get-customervendor-and-company-address-in-ax-2012/

Microsoft Dynamics AX 2012: How to get Company,Customer and Vendor address in AX 2012

原文:http://www.cnblogs.com/Tokywu/p/4660745.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!