Question

Retrieve column values from "Documents to Apply" table at Checks and Payments tab

  • 25 January 2022
  • 0 replies
  • 136 views

Userlevel 4
Badge +2

Hi, 

In this topic - 

It was advised to use such request in order to get data from  "Documents to Apply" table at Checks and Payments tab

foreach (PXResult<APAdjust, APPayment, PX.Objects.AP.Standalone.APRegisterAlias, APTran> res in PXSelectJoin<APAdjust, LeftJoin<APInvoice, On<APInvoice.docType, Equal<APAdjust.adjdDocType>, And<APInvoice.refNbr, Equal<APAdjust.adjdRefNbr>>>,
                                          LeftJoin<APTran, On<APInvoice.paymentsByLinesAllowed, Equal<True>,  And<APTran.tranType, Equal<APAdjust.adjdDocType>, And<APTran.refNbr, Equal<APAdjust.adjdRefNbr>,And<APTran.lineNbr, Equal<APAdjust.adjdLineNbr>>>>>>>,
                                          Where<APAdjust.adjgDocType, Equal<Required<APPayment.docType>>,  And<APAdjust.adjgRefNbr, Equal<Required<APPayment.refNbr>>,
                                          And<APAdjust.released, NotEqual<True>>>>>.Select(new PXGraph(), doc.DocType, doc.RefNbr))
                    {
                        APAdjust adj = res;
                        APPayment apPayment = res;
                        APTran tran = res;

                    }

However such request returns nothing . I started to debug my project and the pointer in code do not entered the foreach cycle.

I tried to form another requests and successfully retrieved list of APAjustment by such request

However, I also need to extract APInvoice, but get the same error as with the initial request which says “Single row was requested”

Can you please help to fix the first request in order to get APInvoice and ApAdjsu inside one iteration or help just with my second request ?

One moment : i can\t use such construction

 foreach (APAdjust res in Base.Adjustments.Select())            {                APAdjust adj = res;            }

Because I am not extending this graph

 


0 replies

Be the first to reply!

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved