Reputation: 267
I customized the RefNbr selector via the DAC to have a couple of other custom columns but it only applies the additional selector column to the AR Invoice screen:
[PXCustomizeSelectorColumns(
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.refNbr),
typeof(PX.Objects.AR.ARInvoice.invoiceNbr),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.docDate),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.finPeriodID),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.customerID),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.customerID_Customer_acctName),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.customerLocationID),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.curyID),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.curyOrigDocAmt),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.curyDocBal),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.status),
typeof(PX.Objects.AR.Standalone.ARRegisterAlias.dueDate),
typeof(PX.Objects.AR.ARRegisterExt.usrProjectId),
typeof(PX.Objects.AR.ARRegisterExt.usrProjectName))]
Successfully added to the Invoices and Memos screen in FINANCE:
But does not show on the DISTRIBUTION Invoices screen which uses the same (?) DAC:
Is there any way to have it also add the selector to the Distribution invoice selector?
I do see that there are two different RefNbr fields that show up when adding a field to customize but selecting either of them adds just one of them... (thus I assumed the screens are using the same DAC)
Upvotes: 1
Views: 178
Reputation: 8268
SOInvoiceEntry graph overrides that field in a cache attached method:
[PXDBString(15, IsKey = true, IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
[PXDefault()]
[PXUIField(DisplayName = "Reference Nbr.", Visibility = PXUIVisibility.SelectorVisible, TabOrder = 1)]
[ARInvoiceType.RefNbr(typeof(Search2<AR.Standalone.ARRegisterAlias.refNbr,
InnerJoinSingleTable<ARInvoice, On<ARInvoice.docType, Equal<AR.Standalone.ARRegisterAlias.docType>,
And<ARInvoice.refNbr, Equal<AR.Standalone.ARRegisterAlias.refNbr>>>,
InnerJoinSingleTable<Customer, On<AR.Standalone.ARRegisterAlias.customerID, Equal<Customer.bAccountID>>>>,
Where<AR.Standalone.ARRegisterAlias.docType, Equal<Optional<ARInvoice.docType>>,
And<AR.Standalone.ARRegisterAlias.origModule, Equal<BatchModule.moduleSO>,
And<Match<Customer, Current<AccessInfo.userName>>>>>,
OrderBy<Desc<AR.Standalone.ARRegisterAlias.refNbr>>>), Filterable = true)]
[ARInvoiceType.Numbering()]
[ARInvoiceNbr()]
protected virtual void ARInvoice_RefNbr_CacheAttached(PXCache sender)
{
}
Your DAC attributes customization is fine but I suspect graph override takes precedence over DAC attributes customization. I would advise you create a graph extension for SOInvoiceEntry, copy/paste the CacheAttached event in it and modify the attributes to have your additional columns.
Use [PXMergeAttributes(Method = MergeMethod.Merge)] attribute to avoid redefining attributes that don't need to be changed.
Upvotes: 2