AR302000页面表格自定义字段选择器添加问题求助
Let's work through each of your problems one by one—these are typical challenges when extending Acumatica's AR adjustments functionality, so we'll get this fixed step by step.
1. Disabled/Read-Only UsrUploadDocNbr in Applications Grid
The root issue here is that the Applications tab grid binds to the ARAdjust DAC, not directly to ARRegister. When you add ARInvoice__UsrUploadDocNbr or ARRegisterAlias__UsrUploadDocNbr directly to the grid, those are linked fields from the related ARRegister record, which are inherently read-only in the ARAdjust context.
Fix:
You already started on the right path by adding the UsrUploadDocNbr field to ARAdjust, but we need to ensure it's properly mapped to the ARRegister extension field and enabled correctly:
public class ARAdjustExt : PXCacheExtension<PX.Objects.AR.ARAdjust> { public abstract class usrUploadDocNbr : IBqlField { } [PXDBString(15, BqlField = typeof(ArRegisterExt.usrUploadDocNbr))] [PXUIField(DisplayName = "Upload Doc. Nbr.", Enabled = true)] [PXSelector( typeof(Search<ARRegister.refNbr, Where<ARRegister.docType, Equal<ARAdjust.adjdDocType>, And<ARRegister.refNbr, Equal<ARAdjust.adjdRefNbr>>>>), typeof(ARRegister.refNbr), typeof(ARRegister.docDate), typeof(ArRegisterExt.usrUploadDocNbr), typeof(ARRegister.finPeriodID), typeof(ARRegister.customerID), typeof(ARRegister.customerLocationID), typeof(ARRegister.curyID), typeof(ARRegister.curyOrigDocAmt), typeof(ARRegister.curyDocBal), typeof(ARRegister.status), typeof(ARRegister.dueDate), typeof(ARRegister.invoiceNbr), typeof(ARRegister.docDesc), SubstituteKey = typeof(ArRegisterExt.usrUploadDocNbr) )] public virtual string UsrUploadDocNbr { get; set; } }
- The
Searchparameter in the selector restricts results to match the current adjustment'sadjdDocTypeandadjdRefNbr, keeping the selector context-aware. - Ensure the
BqlFieldattribute correctly points to yourArRegisterExt.usrUploadDocNbrfield.
2. Selector Columns Showing Field Names Instead of Display Names
Your selector is displaying usrUploadDocNbr instead of "Upload Doc. Nbr." because either:
- The
ArRegisterExt.usrUploadDocNbrfield doesn't have a properly configuredPXUIFieldattribute, or - The selector isn't inheriting the display name from the extension field.
Fix:
First, double-check your ArRegisterExt to confirm the display name is set correctly:
public class ArRegisterExt : PXCacheExtension<PX.Objects.AR.ARRegister> { public abstract class usrUploadDocNbr : IBqlField { } [PXDBString(15)] [PXUIField(DisplayName = "Upload Doc. Nbr.")] // Verify this matches your desired label public virtual string UsrUploadDocNbr { get; set; } }
If the display name still doesn't appear, explicitly define it for the selector column:
[PXSelector( typeof(Search<ARRegister.refNbr, Where<ARRegister.docType, Equal<ARAdjust.adjdDocType>, And<ARRegister.refNbr, Equal<ARAdjust.adjdRefNbr>>>>), typeof(ARRegister.refNbr), typeof(ARRegister.docDate), typeof(PXUIField<ArRegisterExt.usrUploadDocNbr, PXUIFieldAttribute.DisplayName>("Upload Doc. Nbr.")), // ... remaining fields SubstituteKey = typeof(ArRegisterExt.usrUploadDocNbr) )]
3. "Invalid Column Name 'UsrUploadDocNbr'" Error When Customizing AdjdRefNbr Selector
The error happens because you're referencing ArRegisterExt.usrUploadDocNbr directly in the PXCustomizeSelectorColumns attribute. The original selector uses the ARAdjust.ARInvoice alias for ARRegister, so you need to reference the extension field through this alias.
Fix:
Update your AdjdRefNbr customization to use the ARAdjust.ARInvoice alias for the extension field:
public class ARAdjust_Extension : PXGraphExtension<AdjustmentEntry> { [PXMergeAttributes(Method = MergeMethod.Append)] [PXCustomizeSelectorColumns( typeof(ARAdjust.ARInvoice.refNbr), typeof(ARAdjust.ARInvoice.docDate), typeof(ARAdjust.ARInvoice.usrUploadDocNbr), // Use the ARInvoice alias here typeof(ARAdjust.ARInvoice.finPeriodID), typeof(ARAdjust.ARInvoice.customerID), typeof(ARAdjust.ARInvoice.customerLocationID), typeof(ARAdjust.ARInvoice.curyID), typeof(ARAdjust.ARInvoice.curyOrigDocAmt), typeof(ARAdjust.ARInvoice.curyDocBal), typeof(ARAdjust.ARInvoice.status), typeof(ARAdjust.ARInvoice.dueDate), typeof(ARAdjust.ARInvoice.invoiceNbr), typeof(ARAdjust.ARInvoice.docDesc) )] public virtual string AdjdRefNbr { get; set; } }
- Using
typeof(ARAdjust.ARInvoice.usrUploadDocNbr)tells Acumatica to pull the extension field from theARInvoicealias (which maps toARRegister) in the selector's query. - Ensure your
ArRegisterExtis fully deployed and accessible in this graph extension context.
Final Tips
- Always clear the Acumatica cache (System > Management > Clear Cache) after deploying DAC extensions or graph customizations to ensure changes take effect.
- Test each change incrementally to isolate issues—start with fixing the
ARAdjustfield, then the selector display names, then theAdjdRefNbrselector.
内容的提问来源于stack exchange,提问作者Scott

