Dynamics AX Tips

Manipulating Addresses in Microsoft Dynamics AX 2012

Subscribe Here!

Back to main Blog
Steve Shebuski, VP of Digital Strategy

Guiding businesses through their digital transformation journey

4-1Making the switch from Dynamics AX 2009 to 2012 is a change for users and developers alike. AX 2012 changes how addresses are stored and handled.

For example, in Dynamics AX 2009, if you want to store the address for the customer, you would add it on the main customer table (CustTable). In Dynamics AX 2012 however, this address is  stored on the LogisticsPostalAddress table and there are several relations that need to be made before you can grab the address.

Storing Addresses

With the addresses being stored on the LogisticsPostalAddress table in AX 2012, you are able to keep track of historical changes to addresses. AX stores whichever address is valid and the effective date ranges for the previous iterations of the address. 

AX a view (DirPartyPostalAddresssView) in AX that displays all of the relevant address information for each customer. This keeps you from having to write long select statements each time you need to grab an address.

Selecting and Updating Addresses

From a development standpoint, this changes the way we need to think about selecting the address. Instead of going to the main customer table to grab the address, we need to go to a view.

When updating addresses, instead of using a direct update statement you will call the method createOrUpdatePostalAddress. Remember to pass in the correct   validTimeStateUpdateMode to enable AX to track the address history properly.

These changes will give developers more tools to help customize the addresses to meet their clients’ needs.

If you have questions about manipulating addresses in Dynamics AX 2012, contact us. 

Have Questions? We are here to help.

Stay up to date