Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

RE: How write a dynamic select statement in X++

$
0
0

Ok. I got it your requirement now.

You can create query as show above by chaityanya and you would have to decide datasource for your query based on your Customer account from the other table. So Once you get the customer number you can query your above table where tablename , fieldname values are stored and from that you have to find the actual datasource which you want to query.

e.g.

  Common      common;

   DictTable   dictTable;

   ;

   dictTable = new DictTable(_tablenum("YourTablename from config table based on your customer number "));

   common = dictTable.makeRecord();

   select common

   where common.RecId == _recId; // you can use fields you want

Refer this link


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>