我已将“CrossItem”属性添加到“约会”页面中的“InventoryID”字段。但是,这导致库存ID无效的投射问题。
这就是我将属性添加到属性的方式。
这是它的堆栈跟踪。 1/4/2018 10:56:49 AM错误: 错误:处理字段库存ID时发生错误:指定的强制转换无效..
System.InvalidCastException: Specified cast is not valid.
at System.Data.SqlClient.SqlBuffer.get_Int32()
at PX.Data.PXDataRecord.GetInt32(Int32 i)
at PX.Data.PXDBIntAttribute.RowSelecting(PXCache sender, PXRowSelectingEventArgs e)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache.OnRowSelecting(Object item, PXDataRecord record, Int32& position, Boolean isReadOnly)
at PX.Data.PXCache`1.Select(PXDataRecord record, Int32& position, Boolean isReadOnly, Boolean& wasUpdated)
at PX.Data.PXView.GetResult(Object[] parameters, PXFilterRow[] filters, Boolean reverseOrder, Int32 topCount, PXSearchColumn[] sorts, Boolean& overrideSort, Boolean& extFilter)
at PX.Data.PXView.Select(Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXView.SelectMultiBound(Object[] currents, Object[] parameters)
at PX.Data.PXSelectBase`1.selectBound(Object[] currents, Object[] arguments)
at PX.Objects.FS.AppointmentEntry.FSServiceOrder_RowSelected(PXCache cache, PXRowSelectedEventArgs e) in F:\Bld2\AC-FULL2017R201-JOB1\sources\WebSites\Pure\PX.Objects.FS\AppointmentEntry.cs:line 6983
at PX.Data.PXRowSelected.Invoke(PXCache sender, PXRowSelectedEventArgs e)
at PX.Data.PXCache.OnRowSelected(Object item)
at PX.Data.PXCache`1.set_Current(Object value)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] currents, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Data.PXGraph.ExecuteSelect(String viewName, Object[] parameters, Object[] searches, String[] sortcolumns, Boolean[] descendings, PXFilterRow[] filters, Int32& startRow, Int32 maximumRows, Int32& totalRows)
at PX.Web.UI.PXBaseDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSource.ExecuteSelect(String viewName, DataSourceSelectArguments arguments, PXDSSelectArguments pxarguments)
at PX.Web.UI.PXDataSourceView.Select(DataSourceSelectArguments arguments, PXDSSelectArguments swarguments, DataSourceViewSelectCallback callback)
at PX.Web.UI.PXFormDataProvider.DataBind()
at PX.Web.UI.PXBoundPanel.PerformSelect()
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBindChildren()
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at PX.Web.UI.PXBoundPanel.OnAfterSelect(PXFormDataProvider provider)
at PX.Web.UI.PXFormDataProvider.a(IEnumerable A_0)
at PX.Web.UI.PXFormDataProvider.DataBind()
at PX.Web.UI.PXCallbackManager.a(Dictionary`2 A_0, List`1 A_1)
at PX.Web.UI.PXCallbackManager.a(PXCallbackResultMethod A_0, XmlWriter A_1)
at PX.Web.UI.PXCallbackManager.a(PXCallbackResultMethod A_0)
我在服务订单页面也遇到了同样的问题。我该如何解决这个问题?
感谢。