Acumaticaのカスタムテーブルにいくつかの追加フィールドを追加しました。フィールドの1つがエラーの原因です。 SQL Serverを変更してコードを更新しました。エラーを持つフィールドは、コード内で定義されていますAcumaticaのカスタムテーブルにフィールドを追加するとエラーが発生しました。解決する方法?
#region LastRevisionInventoryID
[PXDBInt]
[PXUIField(DisplayName = "Last Revision Inventory ID")]
public int LastRevisionInventoryID { get; set; }
public class lastRevisionInventoryID : IBqlField{}
#endregion
コードを検証し、公開していますが、我々は、画面にフィールドを追加した後の画面を開こうとすると、私たちは次のエラーを取得します。
スタックトレース:
[NullReferenceException: Object reference not set to an instance of an
object.]
_SetValueByOrdinal(ItemBaseDocument , Int32 , Object ,
PXCacheExtension[]) +1012
PX.Data.PXCache`1.SetValueByOrdinal(TNode data, Int32 ordinal, Object
value, PXCacheExtension[] extensions) +84
PX.Data.PXCache`1.a(TNode A_0, TNode A_1, IDictionary A_2,
PXCacheOperation A_3, Boolean A_4) +1273
[PXException: Error: An error occurred during processing of the field
LastRevisionInventoryID : Object reference not set to an instance of an
object..]
PX.Data.PXCache`1.a(TNode A_0, TNode A_1, IDictionary A_2,
PXCacheOperation A_3, Boolean A_4) +2908
PX.Data.PXCache`1.a(TNode A_0, TNode A_1, IDictionary A_2,
PXCacheOperation A_3) +87
PX.Data.PXCache`1.Insert(IDictionary values) +237
PX.Data.PXGraph.ExecuteInsert(String viewName, IDictionary values,
Object[] parameters) +187
PX.Web.UI.PXBaseDataSource.a(Object[] A_0, Object[] A_1, String[] A_2,
Boolean[] A_3, PXFilterRow[] A_4, DataSourceSelectArguments A_5) +1783
PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName,
DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
+13769
PX.Web.UI.PXDataSource.ExecuteSelect(String viewName,
DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
+211
PX.Web.UI.PXDataSourceView.Select(DataSourceSelectArguments arguments,
PXDSSelectArguments swarguments, DataSourceViewSelectCallback callback)
+65
PX.Web.UI.PXFormDataProvider.DataBind() +381
PX.Web.UI.PXBoundPanel.PerformSelect() +134
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +138
PX.Web.UI.PXDataViewBar.OnPreRender(EventArgs e) +33
System.Web.UI.Control.PreRenderRecursiveInternal() +162
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Control.PreRenderRecursiveInternal() +256
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+6925
誰が助けることはできますか? Acumaticaで
私はint型のデータ型を持っていた新しいフィールドへの参照を削除し、今ではあらゆる問題なく働いています。なぜ次のコードでエラーが発生するのですか? –
#region LastRevisionInventoryID [PXDBInt] [PXUIField(最終リビジョンインベントリID)] public int LastRevisionInventoryID {get;セット; } パブリッククラスlastRevisionInventoryID:IBqlField {} #endregion –
以下の回答を参照してください。すべてのカスタムフィールド型をNullable型に変更するまで、同じエラーが再度生成されます。 – RuslanDev