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