
hi..
how can i add item name method as a selected field in query
for example i want the name of the item to be add to the query as a field
queryBuildSource = query1.addDatasource(tableNum(InventTable));
queryBuildSource.addSelectionField(fieldNum(InventTable,ItemId)); Queries are used to get data from database. You can't ask SQL server to filter by X++ display method, but they're not defined in database at all and SQL Server knows nothing about their existance. Display method are defined in AX.
What you can do in this case is opening the method, looking at which database objects are used there and then construct a corresponding database query.