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

后续技术问询:AR303020加载报错及SelectedCustomerLocation缓存未找到

Fix for SelectedCustomerLocation Cache & Event Subscription Errors in AR303020

Hey there, let's tackle those two errors you're hitting after adjusting the TableColumn settings for the Customer Location (AR303020) screen. Both issues tie back to the naming change (removing underscores) not being fully propagated across your code and configuration—here's how to fix each one:

1. "SelectedCustomerLocation has not been found in the list of auto-initialized caches"

This error pops up because Acumatica's cache initialization system can't locate the cache with your new, underscore-free name. Here's what to check:

  • Verify cache/view definitions: Double-check your graph code to ensure the SelectedCustomerLocation view (PXSelect/PXFilter/etc.) is spelled correctly, with no leftover underscores. Make sure every reference to this cache uses the new name.
  • Manual cache initialization (if needed): If this is a custom cache/DAC, add explicit initialization in your graph's constructor to ensure it's registered:
    public PXCache<SelectedCustomerLocation> SelectedCustomerLocation;
    
    public YourCustomerLocationGraph()
    {
        SelectedCustomerLocation = this.Caches[typeof(SelectedCustomerLocation)];
    }
    
  • Check ASPX references: Scan the AR303020 ASPX page for any old references to the underscore-included cache/field name—these can trigger the system to look for a cache that no longer exists.

2. "Failed to subscribe the event PX.Ob..."

This event subscription failure almost always stems from mismatched naming between your event handlers and the updated cache. Follow these steps:

  • Update event subscription targets: In your graph code, find all event handlers (like RowSelected, FieldUpdated) that were tied to the old underscore-included cache. Update the subscription to use the new cache name. For example:
    // Replace this old reference:
    // this._SelectedCustomerLocation.RowSelected += SelectedCustomerLocation_RowSelected;
    
    // With this updated version:
    this.SelectedCustomerLocation.RowSelected += SelectedCustomerLocation_RowSelected;
    
  • Validate handler signatures: Ensure your event handler methods use the correct cache name in their declarations, like this:
    protected void SelectedCustomerLocation_RowSelected(PXCache cache, PXRowSelectedEventArgs e)
    {
        // Your existing logic here
    }
    
  • Check ASPX event bindings: If you have event hooks directly in the ASPX (e.g., OnRowSelected), confirm the method name and associated cache match your updated code.

Final Checks

Don't forget these critical steps to ensure all changes take effect:

  • Clear Acumatica cache: Perform a system-wide cache reset (via the Acumatica UI) or restart your application pool to flush old cached configurations.
  • Republish your custom project: Make sure all compiled code is up-to-date, with no lingering references to the old underscore-included names.

内容的提问来源于stack exchange,提问作者Aaron St Clair

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.20 12:03:55