Customer contact list for AX 2012


Description:-

In this article we will see about how to get customer contact list using Sql query in dynamics ax. here i have created a query to get it from Sql. Query to extract a quick customer contact list from Dynamics ax database.

Sql Query:-


SELECT   CUSTTABLE.ACCOUNTNUM AS CUSTID, DIRPARTYTABLE.NAME AS CUSTNAME,
CASE LOGISTICSELECTRONICADDRESS.TYPEWHEN 1 THEN'Phone'WHEN 2 THEN'Email'ENDAS CONTACTTYPE,
            LOGISTICSELECTRONICADDRESS.DESCRIPTIONAS CONTACTNAME, LOGISTICSELECTRONICADDRESS.LOCATOR AS CONTACTDETAILS 
FROM     DIRPARTYTABLE AS DIRPARTYTABLE INNERJOIN
            CUSTTABLE ON DIRPARTYTABLE.RECID = CUSTTABLE.PARTY INNERJOIN
            DIRPARTYLOCATION ON DIRPARTYTABLE.RECID = DIRPARTYLOCATION.PARTY INNERJOIN
            LOGISTICSELECTRONICADDRESS ON DIRPARTYLOCATION.LOCATION = LOGISTICSELECTRONICADDRESS.LOCATION 
ORDERBY DIRPARTYTABLE.NAME 

Related Posts

Previous
Next Post »

Thanks for comments.....