Good afternoon all,
I am facing an issue that I am admittedly stumped on. A user requested a column be added to the “AP Invoice Entry” program for the purpose of displaying the payment method tied to each invoice. This task was easy enough, I accomplished the task through the Customization script, first adding the column to the ‘Invoices’ grid in the InitializeCustomCode() function. From there I created an EpiViewNotification that listens for a notification of type ‘initialize’ that is tied to the grid that I added the column to. From there, I made use of a dynamic query to populate the column with the payment method for each Invoice. The column works as expected and does not interfere with how invoices are pulled from Docstar into the program.
With context out of the way, this is where things get interesting. The user was able to process invoices all the way to posting them. But when they made use of the “Posted Invoice Maintenance” program to try and update the due date for the invoice. They received the following error,
Error Detail
============
Message: Input array is longer than the number of columns in this table.
Program: System.Data.dll
Method: NewRecordFromArray
Client Stack Trace
==================
at System.Data.DataTable.NewRecordFromArray(Object[] value)
at System.Data.DataTable.LoadRow(Object[] values, LoadOption loadOption, Index searchIndex)
at System.Data.DataTable.LoadDataRow(Object[] values, LoadOption loadOption)
at Ice.DatasetAdapter.LoadRow[TIceRow,TDataTable](TDataTable destinationTable, Func`2 copyIceRowToArray, TIceRow returnedRow, IceRowState rowState)
at Ice.DatasetAdapter.CopyTSTableToDataTable[TIceRow,TDataTable](IceTable`1 sourceTSTable, TDataTable destinationTable)
at lambda_method(Closure , IIceTable , DataTable )
at Ice.DatasetAdapter.Copy(IceTableset sourceTableset, DataSet destinationDataset)
at Ice.Cloud.RpcSerializer.DeserializeDataSetFromTableset(Type tablesetType, Object initialValue, Boolean useSparseCopy, Stream stream)
at Ice.Cloud.RestRpcValueSerializer.Deserialize(ProxyValueOutInfo valueOut, Boolean isMethodReturn, Stream stream)
at Ice.Cloud.RestRpcValueSerializer.Deserialize(ProxyValuesOut valuesOut, Stream stream)
at Ice.Cloud.ProxyBase`1.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Cloud.ProxyBase`1.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Erp.Proxy.BO.APInvoiceImpl.CheckBankRef(APInvoiceDataSet ds, String& OpMessage)
at Erp.Adapters.APInvoiceAdapter.CheckBankRef(String& opMessage)
neither the user nor I have encountered an error of this nature before. Intuition tells me that the column I added is preserving its populated data beyond “AP Invoice Entry” into “Posted Invoice Maintenance” but I find this hard to believe. As it was to my understanding that customization code is isolated to the menu it is applied to, though I could be wrong in my understanding here.
I hope I’ve done an adequate job of explaining my issue here, should you need any elaboration on my part, don’t hesitate to ask. Thanks in advance.