Archive

Archive for January, 2014

Address/Contact Information: Export data using View in AX 2012


Hello Everyone,

It’s been a while since I have blogged and this time I will start on newer version named Dynamics AX2012. Before get into the act, I would like to take this opportunity to wish all a “Very Happy and Prosperous New Year 2014”

AX2012 has implemented lot of changes in GAB and the way they function. This would ideally mean we should know the exact relation between tables to export relevant data. In order to validate the customer addresses/contact information it would be a huge task. So the question remains what is the simplest way to export Customer/Vendor address/contact information the same way as in Dynamics AX forms.

Note: Although we have tools like DIXF/AIF for exporting data.

Exporting Customer Address: The form data which is shown in Customer master is got from a view. Similar approach could be followed to export the data.

Under AOT -> Views and find Party postal address view (DirPartyPostalAddressView). If you try to browse through the data you shall find data corresponding to following fields which is similar to customer address section except to which customer it belong to.

Address

In DirPartyPostalAddressView click on Auto-report the following will be visible

PostalAddressView_AutoReport

In order to get the Customer Id, Customer Name, Purpose(method: locationRoles) and Primary add the following code in the view and drag into Auto-Report and Synchronize it as shown in the image.

PostalAddressView_Code

On viewing the Auto-report in the view the following result will be as below

DirPartyPostalAddressView

Note: Since we are finding customer Id based on it Party from CustTable we might have accounts which are blank, so it could be others account as well like Vendors or warehouse address for which you need to handle via code.

You can now export to excel easily. In case similar functionality is needed to get Contact information for customer/vendor, please follow the similar approach on DirPartyContactInfoView and get the required data ASAP.

Hope this blog post is useful. Happing addressing 🙂 in AX 2012.

Advertisements
Categories: X++ stuffs
%d bloggers like this: