Skip to main content
Solved

Extract Data from Release Payments tab by pressing "Process and "Processing All"

  • January 21, 2022
  • 3 replies
  • 127 views

Forum|alt.badge.img+2

Hi,

The aim of this topic is to figure out to call “Process” and "Processing All" from code and retrieve data from Checks and Applications entity

Currently, I extract data when the user press button “save” at tab Checks and Applications and generates file

 I need to do the same by, making my solution triggered by buttons “Process” and "Processing All"

Can you, please, suggest how to call these events ?

Best answer by markusray17

You would have to intercept the processing delegate, normally you would do that via the Initialize method in a graph extension but it looks like this processing screen sets the delegate on the Row Selected event so you would want to override that. Code sample below.

    public class ReleasePaymentsExt : PXGraphExtension<APReleaseChecks>
{
public static bool IsActive() => true;
public void ReleaseChecksFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e, PXRowSelected baseMethod)
{
baseMethod(sender, e);

var baseDelegate = (PXProcessingBase<APPayment>.ProcessListDelegate)Base.APPaymentList.GetProcessDelegate();

Base.APPaymentList.SetProcessDelegate((List<APPayment> payments) =>
{
baseDelegate(payments);
//Your Code Here
});

}
}

 

3 replies

Forum|alt.badge.img+5
  • Jr Varsity II
  • Answer
  • January 21, 2022

You would have to intercept the processing delegate, normally you would do that via the Initialize method in a graph extension but it looks like this processing screen sets the delegate on the Row Selected event so you would want to override that. Code sample below.

    public class ReleasePaymentsExt : PXGraphExtension<APReleaseChecks>
{
public static bool IsActive() => true;
public void ReleaseChecksFilter_RowSelected(PXCache sender, PXRowSelectedEventArgs e, PXRowSelected baseMethod)
{
baseMethod(sender, e);

var baseDelegate = (PXProcessingBase<APPayment>.ProcessListDelegate)Base.APPaymentList.GetProcessDelegate();

Base.APPaymentList.SetProcessDelegate((List<APPayment> payments) =>
{
baseDelegate(payments);
//Your Code Here
});

}
}

 


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

Hi @markusray17

thank you for the provided code 


marcorojas82
Freshman I
  • Freshman I
  • February 6, 2023

Its equivalent for the Acumatica version 22r2 as it would be ?