Skip to main content
Solved

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


Forum|alt.badge.img+2

Hi,

My application is called when the user presses RELEASE button at Checks and Payments tab

Previously the similar logic was done for Payments and Applications tab is such way

foreach (PXResult<AR.ARAdjust, AR.ARInvoice, PX.Objects.AR.Standalone.ARRegisterAlias, ARTran> gridRow in Base.Adjustments.Select())
                                {
                                    AR.ARAdjust _adjust = gridRow;

                                 } 

And I have ability to access all columns from Documents to Apply tab

How to build same contraction for  Checks and Payments tab in order to get column values ?

Best answer by jinin

Ivan wrote:
jinin wrote:

Hi @Ivan 

If you are not getting the Base graph details, you need to write the BQL. Please try with the below BQL and check

 

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;


                    }

Hi @jinin 

I want to add some information together with previous letter. this request returns empty list

After I pressed Release

I started to debug my project and the pointer in code do not entered the foreach cycle. It returned nothing. Is there can be something that is missed ?

Can you, please, explain these parameters : APAdjust, APPayment, PX.Objects.AP.Standalone.APRegisterAlias, APTran

The question is : it is obligatory to define only these types ? For example I do not use PX.Objects.AP.Standalone.APRegisterAlias and APTran, but as I have mentioned in previous letter I need extract Duedate field that is located in APInvoice entity. Can be such defining be possible ? 

if no, how can I get DueDate ?



Yes. Based on the requirement, we can join the tables and get the data. Please make sure the Join and conditions should be added correctly. To verify the result, We can write SQL script as per the requirement and convert same as BQL.

To get the Due date, you can add the APInvoice table and get the value. 

View original
Did this topic help you find an answer to your question?

Naveen Boga
Captain II
Forum|alt.badge.img+19

Hi, @Ivan  Have you tried below code and verified it?

 

 foreach (PXResult<APAdjust, APPayment, AP.Standalone.APRegisterAlias, APTran> res in Base.Adjustments.Select())
            {
                APAdjust adj = res;
}

 

 


Forum|alt.badge.img+2
  • Varsity I
  • January 21, 2022
Naveen B wrote:

Hi, @Ivan  Have you tried below code and verified it?

 

 foreach (PXResult<APAdjust, APPayment, AP.Standalone.APRegisterAlias, APTran> res in Base.Adjustments.Select())
            {
                APAdjust adj = res;
}

 

 

@Naveen B  I will check it and let you know, thanks


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • January 22, 2022

Hi @Ivan 

If you want to get only the Documents to Apply tab details, we can try like below as well.

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


Forum|alt.badge.img+2
  • Varsity I
  • January 24, 2022
Ivan wrote:
Naveen B wrote:

Hi, @Ivan  Have you tried below code and verified it?

 

 foreach (PXResult<APAdjust, APPayment, AP.Standalone.APRegisterAlias, APTran> res in Base.Adjustments.Select())
            {
                APAdjust adj = res;
}

 

 

@Naveen B  I will check it and let you know, thanks

Hi @Naveen B 

Visual Studio does not see Adjustments in Base 

Are there any references that must be added ?

 


Forum|alt.badge.img+2
  • Varsity I
  • January 24, 2022
jinin wrote:

Hi @Ivan 

If you want to get only the Documents to Apply tab details, we can try like below as well.

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

Hi @jinin 

I also need to extract APInvoices


Forum|alt.badge.img+2
  • Varsity I
  • January 24, 2022
jinin wrote:

Hi @Ivan 

If you want to get only the Documents to Apply tab details, we can try like below as well.

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

In previous letter I wrote : “I also need to extract APInvoices”, I mean APPayment


Naveen Boga
Captain II
Forum|alt.badge.img+19

Hi @Ivan  Can you please confirm on below points

  • Which Acumatica version you are using?
  • Where you have written this code?
foreach (PXResult<APAdjust, APPayment, AP.Standalone.APRegisterAlias, APTran> res in Base.Adjustments.Select())

{

APAdjust adj = res;

APPayment payment = res;

}

 


Forum|alt.badge.img+2
  • Varsity I
  • January 24, 2022
Naveen B wrote:

Hi @Ivan  Can you please confirm on below points

  • Which Acumatica version you are using?
  • Where you have written this code?
foreach (PXResult<APAdjust, APPayment, AP.Standalone.APRegisterAlias, APTran> res in Base.Adjustments.Select())

{

APAdjust adj = res;

APPayment payment = res;

}

 

Hi @Naveen B 

Acumatica version 2021R2

I am using the code provided by you, it can’t find Adjustments

 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • January 24, 2022
Ivan wrote:
jinin wrote:

Hi @Ivan 

If you want to get only the Documents to Apply tab details, we can try like below as well.

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

In previous letter I wrote : “I also need to extract APInvoices”, I mean APPayment


@Ivan  Can you please confirm that you are writing the code on the existing APPayment graph or you written the code inside any static method?

If we extend the graph, we can get the Base details. If using any static method you cant get the Base details. 

Can you please share the code where you are exactly using the code?
 


Forum|alt.badge.img+2
  • Varsity I
  • January 24, 2022
jinin wrote:
Ivan wrote:
jinin wrote:

Hi @Ivan 

If you want to get only the Documents to Apply tab details, we can try like below as well.

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

In previous letter I wrote : “I also need to extract APInvoices”, I mean APPayment


@Ivan  Can you please confirm that you are writing the code on the existing APPayment graph or you written the code inside any static method?

If we extend the graph, we can get the Base details. If using any static method you cant get the Base details. 

Can you please share the code where you are exactly using the code?
 

Hi @jinin 

You are right, I am using a different thing, not APPayment graph

The class, that is used is provide by you in this topic - 

So, I need access to Documents to Apply tab, when I am releasing Checks and Applications Item


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • January 25, 2022

Hi @Ivan 

I hope this issue is resolved as per the update on the  below post

Call Checks and Payments item RELEASE button via event | Community (acumatica.com) 


Forum|alt.badge.img+2
  • Varsity I
  • January 25, 2022
jinin wrote:

Hi @Ivan 

I hope this issue is resolved as per the update on the  below post

Call Checks and Payments item RELEASE button via event | Community (acumatica.com) 

Hi @jinin 

These topics are different. In this topic - Call Checks and Payments item RELEASE button via event | Community (acumatica.com) you have mentioned that extending the graph APPayment, we can get the Base details. In this case APReleaseProcess is extended. How can I access Base.Adjustments from this Method ?

 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • January 25, 2022
Ivan wrote:
jinin wrote:

Hi @Ivan 

I hope this issue is resolved as per the update on the  below post

Call Checks and Payments item RELEASE button via event | Community (acumatica.com) 

Hi @jinin 

These topics are different. In this topic - Call Checks and Payments item RELEASE button via event | Community (acumatica.com) you have mentioned that extending the graph APPayment, we can get the Base details. In this case APReleaseProcess is extended. How can I access Base.Adjustments from this Method ?

 

Hi @Ivan 

You need to write BQL and get the data. For the above example, payment Info we are getting from the APPayment with the Refnbr field. Same as you need to write the bqls and fetch the data.


Forum|alt.badge.img+2
  • Varsity I
  • January 25, 2022
jinin wrote:
Ivan wrote:
jinin wrote:

Hi @Ivan 

I hope this issue is resolved as per the update on the  below post

Call Checks and Payments item RELEASE button via event | Community (acumatica.com) 

Hi @jinin 

These topics are different. In this topic - Call Checks and Payments item RELEASE button via event | Community (acumatica.com) you have mentioned that extending the graph APPayment, we can get the Base details. In this case APReleaseProcess is extended. How can I access Base.Adjustments from this Method ?

 

Hi @Ivan 

You need to write BQL and get the data. For the above example, payment Info we are getting from the APPayment with the Refnbr field. Same as you need to write the bqls and get the data.

Hi @jinin The elemnts that I need to extract atr located in different enitites

For example date is located in Invoices

and reference Nbr is located in Adjust

That construction that was used in class that extends APPaymentEntry

allowed to extract all rows elements coherently. How I must form the request, which fields must be used for mapping in order to ensure that fields belongs to one row ?


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • January 25, 2022

Hi @Ivan 

If you are not getting the Base graph details, you need to write the BQL. Please try with the below BQL and check

 

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;


                    }


Forum|alt.badge.img+2
  • Varsity I
  • January 25, 2022
jinin wrote:

Hi @Ivan 

If you are not getting the Base graph details, you need to write the BQL. Please try with the below BQL and check

 

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;


                    }

Hi @jinin 

Thanks you a lot for the request

One thing I need to clarify : In previous moment I mentioned that I need to extract dueDate column which has type APInvoice, in example, which you provide this type is absent 

Will it be enough if I just add this type to parameters list or it should be done in another way ?


Forum|alt.badge.img+2
  • Varsity I
  • January 25, 2022
jinin wrote:

Hi @Ivan 

If you are not getting the Base graph details, you need to write the BQL. Please try with the below BQL and check

 

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;


                    }

Hi @jinin 

I want to add some information together with previous letter. this request returns empty list

After I pressed Release

I started to debug my project and the pointer in code do not entered the foreach cycle. It returned nothing. Is there can be something that is missed ?

Can you, please, explain these parameters : APAdjust, APPayment, PX.Objects.AP.Standalone.APRegisterAlias, APTran

The question is : it is obligatory to define only these types ? For example I do not use PX.Objects.AP.Standalone.APRegisterAlias and APTran, but as I have mentioned in previous letter I need extract Duedate field that is located in APInvoice entity. Can be such defining be possible ? 

if no, how can I get DueDate ?


Forum|alt.badge.img+2
  • Varsity I
  • January 25, 2022

Hi @jinin 

I tried to change type of parameters and remove some part of checks for search due to the initial request did not returned any data, but the result remains same

can you, please, suggest what should be changed in this request ? 


jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • January 27, 2022
Ivan wrote:
jinin wrote:

Hi @Ivan 

If you are not getting the Base graph details, you need to write the BQL. Please try with the below BQL and check

 

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;


                    }

Hi @jinin 

I want to add some information together with previous letter. this request returns empty list

After I pressed Release

I started to debug my project and the pointer in code do not entered the foreach cycle. It returned nothing. Is there can be something that is missed ?

Can you, please, explain these parameters : APAdjust, APPayment, PX.Objects.AP.Standalone.APRegisterAlias, APTran

The question is : it is obligatory to define only these types ? For example I do not use PX.Objects.AP.Standalone.APRegisterAlias and APTran, but as I have mentioned in previous letter I need extract Duedate field that is located in APInvoice entity. Can be such defining be possible ? 

if no, how can I get DueDate ?



Yes. Based on the requirement, we can join the tables and get the data. Please make sure the Join and conditions should be added correctly. To verify the result, We can write SQL script as per the requirement and convert same as BQL.

To get the Due date, you can add the APInvoice table and get the value. 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings