You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AR302000页面表格自定义字段选择器添加问题求助

Troubleshooting Custom Selector Issues in AR302000 Applications Grid

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 Search parameter in the selector restricts results to match the current adjustment's adjdDocType and adjdRefNbr, keeping the selector context-aware.
  • Ensure the BqlField attribute correctly points to your ArRegisterExt.usrUploadDocNbr field.

2. Selector Columns Showing Field Names Instead of Display Names

Your selector is displaying usrUploadDocNbr instead of "Upload Doc. Nbr." because either:

  • The ArRegisterExt.usrUploadDocNbr field doesn't have a properly configured PXUIField attribute, 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 the ARInvoice alias (which maps to ARRegister) in the selector's query.
  • Ensure your ArRegisterExt is 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 ARAdjust field, then the selector display names, then the AdjdRefNbr selector.

内容的提问来源于stack exchange,提问作者Scott

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.15 06:46:01