I used the following code, and it seems to work. I'm sharing it here for reference. If any experts can help with a code review or point out potential issues, that would be greatly appreciated. Please do not use this code in a production environment without careful consideration.
namespace PX.Objects.AP
{
public class APPrintChecks_Extension : PXGraphExtension<PX.Objects.AP.APPrintChecks>
{
#region Event Handlers
//in 2024r2 official version first sort by vendor,overwrite it
[PXFilterable]
public PXFilteredProcessingJoin<APPayment, PrintChecksFilter,
InnerJoin<Vendor, On<Vendor.bAccountID, Equal<APPayment.vendorID>>,
LeftJoin<CABatchDetail, On<CABatchDetail.origModule, Equal<BatchModule.moduleAP>,
And<CABatchDetail.origDocType, Equal<APPayment.docType>,
And<CABatchDetail.origRefNbr, Equal<APPayment.refNbr>>>>>>,
Where2<
Where<APPayment.status, Equal<APDocStatus.pendingPrint>,
And<CABatchDetail.batchNbr, IsNull,
And<APPayment.cashAccountID, Equal<Current<PrintChecksFilter.payAccountID>>,
And<APPayment.paymentMethodID, Equal<Current<PrintChecksFilter.payTypeID>>,
And<Match<Vendor, Current<AccessInfo.userName>>>>>>>,
And<APPayment.docType, In3<APDocType.check, APDocType.prepayment, APDocType.quickCheck>>>,
OrderBy<Asc<APPayment.refNbr>>> APPaymentList;
#endregion
}
}