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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Link MarkUpTrans to CustInvoiceJour table

(0) ShareShare
ReportReport
Posted on by 190

Hello,

I have inserted charges values (markUpTrans.values) for sales order '000711' (custInvoiceJour.SalesId) and want to retrieve this value.

I have then linked these two tables in my x++ code as below:

select markupTrans where markupTrans.TransRecId == custInvoiceJour.RecId;

 

(In the relations for MarkUpTrans there is also " markupTrans.TransTableId == custInvoiceJour.TableId; " but I can't find any field named tableId in custInvoiceJour so I used on TransRecId to link the tables.) 

However, I am not obtaining the right value and when I checked in sql it is returning the markuptrans.value for salesOrder '000014' which means that this relation is not working. How do I link these tables? 

And also, is there any way to link MarkUpTable to custInvoiceJour?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi Oush,

    The TableID field is a special one which is not visible at the table design, but can be used in coding. So, add this in your where clause, and your issue should be solved. You can also use "tablenum(CustInvoiceJour)" to get the tableId. The TransRecId is not unique when querying it without the correct table ID.

  • Verified answer
    Ali Zaidi Profile Picture
    4,657 on at

    Oush Mi Ta, there is direct relationship between MarkupTrans and CustinoviceTrans. You can query on CustInvoiceTrans, Which is child table of CustInvoiceJour. For your reference I also add the screenshot of table relation.

    Markuptrans.PNG

     

    Hope this helps :)

  • Oush Mi Ta Profile Picture
    190 on at

    Thanks it works

  • RomanBI Profile Picture
    10 on at

    you need the TableId with CustInvoiceTrans as well, right? 

    how to get the TableId in Power BI ? 

    - Roman

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans