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

Notifications

Announcements

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,829 Moderator on at

    Yes you can use the same thread.

    Hi goshoom ,

    Do you have any idea on this.

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Hi Girish i don't know how forward this question Martin sir can you help plz. And i rejected your answer so shall I use same thread?

  • waytod365 Profile Picture
    351 on at

    @MartinDráb sir i need your help

  • GirishS Profile Picture
    27,829 Moderator on at

    Sorry for the late reply. Unfortunately I don't have any valuable suggestion for this.

    Please create separate thread so other community members can help with your scenario.

    Thanks,

    Girish S.

  • waytod365 Profile Picture
    351 on at

    Hi Girish,

    I'm waiting for your valuable answer.

    Please help me on this. I'm stuck.

  • 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

  • GirishS Profile Picture
    27,829 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

    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,829 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 checked LedgerJournalTrans table.

    LedgerJournalTrans.hasPendingInvoice();

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

    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

News and Announcements

Season of Giving Solutions is Here!

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
Abhilash Warrier Profile Picture

Abhilash Warrier 843 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 324 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans