Skip to main content

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 ?

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;
}

 

 


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 @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, @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 ?

 


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


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


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 @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

 


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 @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


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 @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 

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.


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 ?


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 @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 ?


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 ?


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 ? 


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