2021年1月28日星期四

Overriding PXFilteredProcessingJoin and delegate for APPrintChecks

I have the same issue as the below link but with a different graph (APPrintChecks)

how-do-i-override-pxfilteredprocessingjoin-in-a-graph-extension-without-altering

I am overriding the main view to pull in the remittance name from APContact to show in the grid.

[PXFilterable]  public PXFilteredProcessingJoin<APPayment, PrintChecksFilter,    InnerJoin<Vendor, On<Vendor.bAccountID, Equal<APPayment.vendorID>>,    InnerJoin<APContact, On<APContact.contactID, Equal<APPayment.remitContactID>>>>,    Where<boolTrue, Equal<boolTrue>>,    OrderBy<Asc<Vendor.acctName, Asc<APPayment.refNbr>>>> APPaymentList;  

However, I do not know how to override the delegate so I won't have the same problem as the other poster (no filter being applied).

protected virtual IEnumerable appaymentlist()      {          if (cleared)          {              foreach (APPayment doc in APPaymentList.Cache.Updated)              {                  doc.Passed = false;              }          }            foreach (PXResult<APPayment, Vendor, PaymentMethod, CABatchDetail> doc in PXSelectJoin<APPayment,              InnerJoinSingleTable<Vendor, On<Vendor.bAccountID, Equal<APPayment.vendorID>>,              InnerJoin<PaymentMethod, On<PaymentMethod.paymentMethodID, Equal<APPayment.paymentMethodID>>,              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>>>>.Select(this))          {              yield return new PXResult<APPayment, Vendor>(doc, doc);              if (_copies.ContainsKey((APPayment)doc))              {                  _copies.Remove((APPayment)doc);              }              _copies.Add((APPayment)doc, PXCache<APPayment>.CreateCopy(doc));          }      }  

There are other private variables that are referenced in this. Any help appreciated.

Also, if there's a simpler way to pull in a related value on a grid like this (virtual field in DAC?) I'm not stuck on doing it with a graph extension.

https://stackoverflow.com/questions/65945798/overriding-pxfilteredprocessingjoin-and-delegate-for-apprintchecks January 29, 2021 at 05:55AM

没有评论:

发表评论