Acumatica升级至2021 R2后Service Orders页面报错:找不到sODetID字段(取消自定义项后异常仍存在)
I’ve dealt with plenty of similar metadata-related errors during Acumatica upgrades and customization deployments, so let’s break down your scenario and target fixes based on the details you shared and that stack trace.
Your Scenario Recap
- Upgraded client data to 2021 R2 via
ac.config - Updated and published customizations to align with new DLLs
- Service Orders screen (FS3001PL) throws "A field with the name sODetID cannot be found" when accessed
- No explicit use of
sODetIDin your customization code - Previously referenced
FSSODet(which containssODetID) in a GI but removed it—error persists even after unpublishing all customizations - Screen works perfectly in a clean demo tenant with no customizations
- VS 2020 debugger isn’t triggering breakpoints on the error
Full error stack trace:
[PXException: Error: A field with the name sODetID cannot be found.]
PX.Data.Description.GI.PXDesignedQueryProvider.GetValue(PXQueryDescription descr, String value, IPXValue field, PXTable table, String alias, Boolean& useExt, Nullable1& condition) +2949 PX.Data.Description.GI.PXDesignedQueryProvider.CollectRelations(PXQueryDescription descr) +1378 PX.Data.Description.GI.PXDesignedQueryProvider.FillDescription(PXQueryDescription descr) +166 PX.Data.Description.GI.PXQueryDescription.Create(IGenericQueryProvider prov) +73 PX.Data.PXGenericInqGrph.get_BaseQueryDescription() +39 PX.Data.PXGenericInqGrph.CollectDescriptionFields() +47 PX.Data.PXGenericInqGrph.PrepareCaches(GIDescription def, Dictionary2 parameters) +310
PX.Data.PXGenericInqGrph.PrepareCaches(String id, String name, Dictionary2 parameters, Boolean fetchSchema) +466 PX.Web.UI.PXGenericDataSource.InstantiateDataGraph(Type type) +785 PX.Web.UI.PXBaseDataSource.CreateDataGraphAsSingleton(Type type) +560 PX.Web.UI.PXBaseDataSource.CreateDataGraph(Type type) +175 PX.Web.UI.PXBaseDataSource.get_DataGraph() +412 PX.Web.UI.PXDataSource.HasDashboardsSupport() +16 PX.Common.Tools.With(TInput o, Func2 evaluator) +75
PX.Web.UI.PXGrid.RenderToolsRow(Boolean top) +1910
PX.Web.UI.PXGrid.CreateChildControls(IEnumerable dataSource, Boolean dataBinding) +867
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +230
System.Web.UI.Control.EnsureChildControls() +130
System.Web.UI.WebControls.CompositeDataBoundControl.get_Controls() +24
PX.Web.UI.PXSmartPanel.CollectInnerControls(ControlCollection controls, Boolean load, Boolean collectUpdatable) +347
PX.Web.UI.PXSmartPanel.CollectInnerControls(Boolean load) +110
PX.Web.UI.PXSmartPanel.SetBindingState(Boolean load) +109
PX.Web.UI.PXSmartPanel.OnInit(EventArgs e) +99
System.Web.UI.Control.InitRecursive(Control namingContainer) +454
System.Web.UI.Control.InitRecursive(Control namingContainer) +219
System.Web.UI.Control.InitRecursive(Control namingContainer) +219
System.Web.UI.Control.InitRecursive(Control namingContainer) +219
System.Web.UI.Control.InitRecursive(Control namingContainer) +219
System.Web.UI.Control.InitRecursive(Control namingContainer) +219
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1719
Key Troubleshooting Steps
That stack trace screams orphaned Generic Inquiry (GI) metadata—even though you removed the FSSODet table from your GI, Acumatica often leaves residual references in the database. Here’s how to track them down:
1. Hunt for orphaned GI references in the database
First, run these SQL queries against your client’s tenant database (always back up first!):
- Find GI definitions still referencing
sODetID:SELECT * FROM GI.Description WHERE XMLDescription LIKE '%sODetID%' - Check cached GI data (Acumatica caches GI definitions for performance):
SELECT * FROM GI.CachedDescription WHERE XMLDescription LIKE '%sODetID%'
If you find matches, delete those records, then go to System > Management > Clear Cache and test the screen again.
2. Check for embedded GIs or dashboards tied to the screen
The error happens when rendering the PXGrid’s tools row, which means a dashboard or embedded GI linked to FS3001PL is likely the culprit:
- Go to System > Customization > Screens, locate FS3001PL, and check if any dashboards are associated with it.
- Use the Customization Editor to inspect the screen’s layout—look for any hidden PXGrid controls that pull data from a GI.
3. Wipe user personalizations
Even if you fixed the base GI, user-specific personalizations might still hold the old sODetID reference:
- Navigate to System > Management > Personalization, filter for FS3001PL, and delete all personalizations for the screen.
- For the GI you modified, go to Actions > Manage Personalizations and remove any user-specific customizations.
4. Enable Acumatica trace logging for GI details
Since your VS debugger isn’t hitting breakpoints, turn on verbose tracing for GI-related code:
- Go to System > Management > Trace Settings, set Trace Level to
Verbose, and addPX.Data.Description.GIto the included namespaces. - Reproduce the error, then check the trace log (System > Management > Trace Viewer) for the exact GI/query that’s trying to access
sODetID.
5. Rebuild system metadata
If the upgrade corrupted screen metadata, run a metadata rebuild via ac.config:
ac.config --metarebuild
After rebuilding, clear the cache and test the screen again. You can also export the FS3001PL screen definition from the working demo tenant, compare it to your client’s, and reimport the clean version if needed.
Final Thoughts
This issue is almost always tied to leftover metadata that didn’t get cleaned up during the upgrade or GI modification. Focusing on the GI database tables and cached data should get you past this error.
内容的提问来源于stack exchange,提问作者MarkJoel60

