Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

how can i add item name method as aselected field in query

Posted on by 35

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));

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 225,490 Super User on at
    RE: how can i add item name method as aselected field in query

    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.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans