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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Get trans date payment.

(0) ShareShare
ReportReport
Posted on by 351

Hi all,

Accounts payable<Invoice< pending invoice

Table : vendInvoiceInfoTable.

Accounts payable<Payments< vendor payment journal

Table : LedgerJournalTable

Now, i want to pick pending invoice against payment journal trans date so that i checked both table has relation.

VendImvoiceInfoTable.poolRecid and LedgerJournalTable.Recid.

But, poolRecid set visible no that table. How can I get value ledger journal table? 

I want to pick trans date from LedgerJournalTable table pending invoice against.

Thanks 

I have the same question (0)
  • GirishS Profile Picture
    27,827 Moderator on at

    Hi waytod365,

    "PoolRecId" field is set to visible No on table. But it can be used in the select statement to join with LedgerJournalTrans table.

    Can you tell me what is the difficulty you are facing?

    You can join like VendInvoiceInfoTable (TableName) >> PoolRecId (FieldName) >> LedgetJournalTrans (TableName) >>RecId (FieldName) >> LedgerJournalTable (TableName) >> JournalNum (FieldName).

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Thanks for your prompt response,

    Actually i want like 

    LedgerJournalTable ledgerJournalTable = LedgerJournalTable::findbyrecid(vendInvoiceInfoTable.poolRecid,false);

     AMRRiskTmp.PaymentDate = ledgerJournalTable.TransDate;

    Return null there is no poolRecid value.

    By a join will work? Could you please elaborate and give example code plZ?

    Thanks 

  • GirishS Profile Picture
    27,827 Moderator on at

    Yes, PoolRecId value is 0 for all the records - Adding PoolRecId as relation does not work.

    Just try to find relation between VendInvoiceInfoTable, VendInvoiceInforLine and VendInvoiceInfoLineSub.

    There is a lot of tables Starting with VendInvoiceInfoLine.

    Check whether you can join any of the above tables to get desired results.

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Hi,

    I want to pick data from LedgerJournalTrans so that poolRecid no use.

    There is in-direct relation no how can I get ? VendIncoiceInfoTable and line? For what?

    An alternative way please suggest me.

    Thanks

  • GirishS Profile Picture
    27,827 Moderator on at

    Unfortunately I cannot find any direct relationship between tables.

    You need to find the relations using trail and error.

    Use find reference to see where VendInoviceainfoTable is used especially in views with related to LedgeraJournalTrans.

    Also there is a table name starting with VendInvoiceInfoTable name like VendInvoiceInfoLine and VendInvoiceInfoSub.

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Hi Girish,

    I have checked LedgerJournalTrans table.

    LedgerJournalTrans.hasPendingInvoice();

    The method inside same code shall i use ? And get it with trans date? Let me know

    Thanks 

  • GirishS Profile Picture
    27,827 Moderator on at

    Yes you can give it a try using this method.

    There is also one more option - If you want to get pending invoice against LedgerJournalTrans payment date - Just refer to the below code and check whether it works.

    LedgerJOurnalTrans journal;
    VendInvoiceInfoTable invoiceVendro;
    
    while select * from journal
     Group by journal.PaymentDate
    {
      //add code here to get the pending ivoice against the payment date.  
    }

    I am not sure this will worker but you can try that and see whether its suits your scenario.

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Hi Girish,

    I have tried code below it's null transDate.

    LedgerJournalTrans localLedgerJournalTrans;
     VendInvoiceInfoTable localVendInvoiceInfoTable;

           
            select firstonly localLedgerJournalTrans
            group by localLedgerJournalTrans.TransDate
            join localVendInvoiceInfoTable where localVendInvoiceInfoTable.PoolRecId == localLedgerJournalTrans.RecId
            &&  localVendInvoiceInfoTable.ParmJobStatus != ParmJobStatus::Executed
            &&  localVendInvoiceInfoTable.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending;
           


           
            info(strFmt("%1",localLedgerJournalTrans.TransDate));
    Please give me your example code and i don't know.
    Thanks 
  • GirishS Profile Picture
    27,827 Moderator on at

    No as you already said you want to get the pending invoice against the LedgerJournalTrans payment date. That's why I asked you to add while select statement by grouping payment date.

    Also PoolRecId we cannot use since the values is 0 for all the records.

    LedgerJOurnalTrans journal;
    VendInvoiceInfoTable invoiceVendor;
    
    while select * from journal
     Group by journal.PaymentDate
    {
      select * from invoiceVendor 
            where invoiceVendor.ParmJobStatus != ParmJobStatus::Executed
            &&  invoiceVendor.VendInvoiceSaveStatus == VendInvoiceSaveStatus::Pending
            && invoiceVendor.TransDate == journal.PaymentDate;
       infi(strfmt("%1",invoiceVendor.Transdate));
            
    }

    I don't know the exact scenario you are developing. But check whether the above code suits your scenario.

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Sorry I mislead you actually i want if i post "pending vendor invoice" form and the record will be created from "vendor payment journal".

    I'm working on it in ssrs report.

    TempTable.paymentDate = LedgerJournalTrans.TransDate.

    I saw it while posting class.

    Class name : PurchFormLetter_Invoice

    Now, how can I get LedgerJournalTrans table "TransDate" if pending vendor invoice posted against record?

    Thanks

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans