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

Acumatica 6.1:取消服务订单屏幕RowSelected事件的字段自动填充

How to Prevent Auto-Filling of DocDesc and TranDesc on Labor Tab Rows in Acumatica 6.1 Service Orders

I’ve worked with Acumatica 6.1’s custom service management modules before, so I know exactly how to override that annoying auto-fill behavior. Here’s a step-by-step solution to get what you need:

Step 1: Create a Graph Extension for ServiceOrderEntry

You’ll need to extend the base ServiceOrderEntry graph to override the RowSelected event logic that’s causing the auto-fill. First, make sure you’re referencing the correct namespaces for the service management module (usually PX.Objects.SM in 6.1).

Step 2: Write the Override Logic

Use PXOverride to replace the default RowSelected method, or subscribe to the RowSelected event for the SrvLabor DAC (the DAC behind Labor tab rows). The goal is to clear out the auto-filled DocDesc and prevent TranDesc from being set to match it.

Here’s the full code example:

using PX.Data;
using PX.Objects.SM;

public class ServiceOrderEntryExtension : PXGraphExtension<ServiceOrderEntry>
{
    [PXOverride]
    public void RowSelected(PXCache cache, PXRowSelectedEventArgs e)
    {
        // First, get the current Labor row
        var laborRow = e.Row as SrvLabor;
        if (laborRow == null)
        {
            // Call the base method for non-Labor rows to preserve standard behavior
            Base.RowSelected(cache, e);
            return;
        }

        // Skip the auto-fill logic for Labor rows entirely
        // Keep DocDesc empty for manual user input
        cache.SetValue<SrvLabor.docDesc>(laborRow, null);
        // Ensure TranDesc doesn't get auto-set to DocDesc's value
        cache.SetValue<SrvLabor.tranDesc>(laborRow, null);

        // Mark the row as updated so Acumatica recognizes our manual override
        cache.SetStatus(laborRow, PXEntryStatus.Updated);
    }
}

Step 3: Deploy the Customization

  1. Compile this code into a DLL (or add it directly to an Acumatica Customization Project using the built-in Code Editor).
  2. Publish the customization project to your Acumatica 6.1 instance.
  3. Test the Service Orders screen: select a Labor row, and you’ll see DocDesc remains empty for manual input, with no auto-population of TranDesc.

Quick Notes:

  • If your service module uses a different DAC name instead of SrvLabor, adjust the code to match your instance’s DAC (you can verify this via the Acumatica Customization Project’s Inspector tool).
  • The code preserves standard RowSelected behavior for other tabs (like Parts) while targeting only Labor rows—exactly what you requested.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.27 09:46:21