我想在屏幕AP302000和AP301000的查找过滤器的代码拆分中进行管理:
为此,我想为APPaymentEntryExt编写扩展名。 最初,我认为可以通过RefNbr的选择器来实现,并尝试添加以下代码:
public class RefNbr2Attribute : PXSelectorAttribute
{
public RefNbr2Attribute(Type SearchType)
: base(SearchType, typeof(APPayment.refNbr), typeof(APPayment.docDate), typeof(APPayment.finPeriodID),
typeof(APPayment.vendorID), typeof(APPayment.vendorID_Vendor_acctName),
typeof(APPayment.vendorLocationID), typeof(APInvoice.invoiceNbr), typeof(APPayment.curyID),
typeof(APPayment.curyOrigDocAmt), typeof(APPayment.curyDocBal), typeof(APPayment.status),
typeof(APInvoice.dueDate))
{
}
}
public class APPaymentEntryExt : PXGraphExtension<APPaymentEntry>
{
[PXDBString(15, InputMask = ">CCCCCCCCCCCCCCC", IsKey = true, IsUnicode = true)]
[PXDefault]
[PXUIField(DisplayName = "Reference Nbr.", TabOrder = 1, Visibility = PXUIVisibility.SelectorVisible)]
[RefNbr2(typeof(Search2<APRegisterAlias.refNbr, InnerJoinSingleTable<APInvoice, On<APInvoice.docType,
Equal<APRegisterAlias.docType>, And<APInvoice.refNbr, Equal<APRegisterAlias.refNbr>>>,
InnerJoinSingleTable<Vendor, On<APRegisterAlias.vendorID, Equal<Vendor.bAccountID>>>>,
Where<APRegisterAlias.docType, Equal<Optional<APInvoice.docType>>,
And2<Where<APRegisterAlias.origModule, NotEqual<BatchModule.moduleTX>, Or<APRegisterAlias.released,
Equal<True>>>, And<Match<Vendor, Current<AccessInfo.userName>>>>>, OrderBy<Desc<APRegisterAlias.refNbr>>>),
Filterable = true, IsPrimaryViewCompatible = true)]
[APPaymentType.Numbering]
[PXFieldDescription]
protected void APPayment_RefNbr_CacheAttached(PXCache sender)
{
}
但这没有帮助。