How to load data based on different two conditions in where Clause in Dynamics Ax

Hello friends… I’ve using Lookup form by using SysTableLookup Class and Lookup() Method, where i got lookup form. For Example In my project, I have created three different tables called Country, State and ZipCode tables. If i select record from Country field, i can get related States in State field from State Table by using ‘CountryCode’ Reference Key. But in the case of Zipcode, I want to load zipcodes based on Particular Country and its related State, that is, If i have to load zipcodes from Zipcode Table, i should have ‘CountryCode’ and ‘StateCode’ in WHERE Condition. How can i generate code for this query in ExecuteQuery() method in Dynamics Ax.

I hope that U understand my question…

Thanks all…

You can use dynamic Query in SysTable Lookup Class.

You have to create an object of Query in the Lookup Mehtods.

Add the datasource and add Link data source.

Use filter using these two data source in Query.Run() method.


Janak Talekar