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

How to get purchase order charges from MarkupTrans table in x++?

$
0
0

Hii,

I am trying to get Purchase Order Landed Cost or Mis Cost that we enter during PO invoicing. It is going into MarkupTrans table. In the AOT I saw the relation between PurchLine table and MarkupTrans table, even then its not showing the records. Here is my code.

static void LandedCost_Cost(Args _args)
{
    PurchTable  purchTable;
    PurchTable  purchLine;
    MarkupTrans markupTrans;
    
    select firstOnly purchLine where purchLine.PurchId == "PO000000003";
    if(purchLine.RecId)
    {
        select * from markupTrans where markupTrans.TransTableId == purchLine.TableId && markupTrans.TransRecId == purchLine.RecId;
        
        info(strFmt("%1, %2, %3",purchLine.PurchId, purchLine.RecId, markupTrans.Value));
    }
        
    /* 
    select firstOnly purchTable where purchTable.PurchId == "PO000000003";
    if(purchTable.RecId)
    {
        select * from markupTrans where markupTrans.TransTableId == purchTable.TableId && markupTrans.TransRecId == purchTable.RecId;
        
        info(strFmt("%1, %2, %3",purchTable.PurchId, purchTable.RecId, markupTrans.Value));
    }
    */
}

Not returning values in markupTrans.Value. Even in SQL queries. Am I missing something?

Thanks,



Viewing all articles
Browse latest Browse all 72043

Trending Articles



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