web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

I have trouble getting the look up value.

(0) ShareShare
ReportReport
Posted on by

Hi all,

I have trouble getting the look up value. 

 When I look up RM Item from Transfer number, I have item, voucher, avaible qty. I would like to take a voucher corresponding to the RM Item.

Pc1404.png

PC1403.png

Can anyone help me?

*This post is locked for comments

I have the same question (0)
  • Fredrik Sætre Profile Picture
    12,644 on at

    This looks like some special customization based off of some customized data that all ready exist. If you want help with this you probably would have to explain more what you are doing...  You won't normally have a FG-RM relationship in Transfer journals. That is something that production orders are used for.

    You find the relationship between production order in ProdBOM, but ProdCalcTrans can give you insights to actually consumed and estimated item consumption.

  • Community Member Profile Picture
    on at

    thanks for your reply.

    I had the solution. I will use lookup form. I will create ok button when I want to get the current value

  • Suggested answer
    Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Please use the following code in your lookup method(modified your query):

    Query                   query = new Query();

       QueryBuildDataSource    qbdsJourLine, qbdsBHS;

       SysTableLookup          sysTableLookup = SysTableLookup::newParameters(tableNum(InventTransferJourLine), _formControl);

       qbdsJourLine = query.addDataSource(tableNum(InventTransferJourLine));  

       qbdsBHS = qbdsJourLine.addDataSource(tableNum(BHS_MaterialUsedForNewProductJournal));

       qbdsBHS.addLink(fieldNum(InventTransferJourLine, TransferId), fieldNum(BHS_MaterialUsedForNewProductJournal, TransferNumber));

       qbdsJourLine.addRange(fieldNum(InventTransferJourLine,

      QtyReceived)).value(strFmt('(%1 > 0)', fieldStr(InventTransferJourLine, QtyReceived)));

       SysTableLookup.addLookupfield(fieldNum(InventTransferJourLine, ItemId), true);

       SysTableLookup.addLookupfield(fieldNum(InventTransferJourLine, VoucherId));

       SysTableLookup.addLookupfield(fieldNum(InventTransferJourLine, BHS_AvaiableQty));

       SysTableLookup.parmQuery(query);

       SysTableLookup.performFormLookup();

    It generates the following query :

    SELECT * FROM InventTransferJourLine(InventTransferJourLine_1) WHERE (((QtyReceived > 0)))

    JOIN * FROM BHS_MaterialUsedForNewProductJournal(BHS_MaterialUsedForNewProductJournal_1)

    ON InventTransferJourLine.TransferId = BHS_MaterialUsedForNewProductJournal.TransferNumber

    Hope this helps you.

    Thanks,

    Chaitanya Golla

  • Community Member Profile Picture
    on at

    Hi Chaitanya Golla,

    thanks for your reply.

    I want to retrieve all column values ​​when looking for RM items. when i looked up , i want get value of voucher, Avaible qty

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans