Showing posts with label Vochar Transactions. Show all posts
Showing posts with label Vochar Transactions. Show all posts

Friday, October 27, 2023

how to get vouchar transactions from Purchase order Receipt

 how to get voucher transactions from Purchase order Receipts.

internal final class RunnableClass

{

   /// <summary>

   /// Class entry point. The system will call this method when a designated menu

   /// is selected or when execution starts and this class is set as the startup class.

   /// </summary>

   /// <param name = "_args">The specified arguments.</param>

   public static void main(Args _args)

   {

       GeneralJournalEntry generalJournalEntry;

       VendInvoiceJour       VendInvoiceJour;

       GeneralJournalAccountEntry      GeneralJournalAccountEntry;

 

       while select GeneralJournalAccountEntry

           join generalJournalEntry

           where GeneralJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId

           && generalJournalEntry.DocumentNumber == 'return12283'

       {

           Info(strFmt("%1",generalJournalEntry.SubledgerVoucher));

       }

   }

}

==========================

SQL statement:-

select * from GeneralJournalAccountEntry

join GeneralJournalEntry

on GeneralJournalAccountEntry.GENERALJOURNALENTRY = GeneralJournalEntry.RECID

and GeneralJournalEntry.DOCUMENTNUMBER = 'AP-0001'

Output:-



How to Retrieve the Purchase Order Number in the LedgerTransAccount Form using X++ in D365 Finance & Operations

 How to Retrieve the Purchase Order Number in the LedgerTransAccount Form using X++ in D365 Finance & Operations [ExtensionOf(tableStr(G...