Data validation - importing lines with invalid GL accounts in GL Journal Entry using Paste-Insert

We recently upgraded from 10.1.500.8 to 10.2.400.7

For our journal entries, we create them in Excel, then copy the lines, and then use Paste-Insert to load them into list view of GL Journal Entry.

In 10.1.500.8, when we attempt to paste in a line with an invalid GL account, we get an immediate error (see Error 10.1 below), and the paste-insert stops at that line.

In 10.2.400.7, the paste-insert continues with no indication that the GL account is invalid. It’s only when you try to post the entry you get an error (see Error 10.2 below)

Is there a simple way in 10.2.400.7 to mimic the 10.1.500.8 behavior?

Thank you!
Gary

Error Text:
Business Layer Exception

COA Segment Value 088 is not found for Segment Department.

Exception caught in: Epicor.ServiceModel

Error 10.1

Description: COA Segment Value 088 is not found for Segment Department.
Program: Erp.Services.BO.GLJournalEntry.dll
Method: GLJrnDtlMnlBeforeUpdate
Line Number: 3727
Column Number: 13
Table: GlJrnDtlMnl
Field: GLAccount
Server Trace Stack: at Erp.Services.BO.GLJournalEntrySvc.GLJrnDtlMnlBeforeUpdate() in c:_Releases\ERP\RL10.1.500\Source\Server\Services\BO\GLJournalEntry\GLJournalEntry.cs:line 3727
at Ice.Services.Trace.TablesetProfilingCollector.DoRowEventTrace(String tableName, String methodName, Int32 rowCount, Action action) in C:_Releases\ICE\3.1.500.8\Source\Framework\Epicor.Ice\Services\TablesetProfilingCollector.cs:line 146
at Ice.TablesetBound3.CreateRow(IceDataContext dataContext, Int32 tableNum, IIceTable table, IceRow newTablesetRow, TablesetProfilingCollector parentTraceCollector) in C:\_Releases\ICE\3.1.500.8\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 1026 at Ice.TablesetBound3.WriteTable(IceDataContext dataContext, Int32 tableIndex, IIceTable table, TablesetProfilingCollector parentTraceCollector) in C:_Releases\ICE\3.1.500.8\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 886
at Ice.TablesetBound3.InnerUpdate(IceDataContext dataContext, TFullTableset tableset) in C:\_Releases\ICE\3.1.500.8\Source\Framework\Epicor.Ice\Services\TablesetBound.cs:line 797 at Erp.Services.BO.GLJournalEntrySvc.Update(GLJournalEntryTableset& ds) in c:\_Releases\ERP\RL10.1.500\Source\Server\Services\BO\GLJournalEntry\GLJournalEntry.Designer.cs:line 1881 at Erp.Services.BO.GLJournalEntrySvcFacade.Update(GLJournalEntryTableset& ds) in c:\_Releases\ERP\RL10.1.500\Source\Server\Services\BO\GLJournalEntry\GLJournalEntrySvcFacade.cs:line 1422 at SyncInvokeUpdate(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at Epicor.Hosting.OperationBoundInvoker.InnerInvoke(Object instance, Func2 func) in C:_Releases\ICE\3.1.500.8\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59
at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func2 func) in C:\_Releases\ICE\3.1.500.8\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 28 at Epicor.Hosting.Wcf.EpiOperationInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) in C:\_Releases\ICE\3.1.500.8\Source\Framework\Epicor.System\Hosting\Wcf\EpiOperationInvoker.cs:line 23 at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc) at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc) at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet) at System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext request, Boolean cleanThread, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext) at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result) at System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result) at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result) at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously) at System.ServiceModel.Channels.SecurityChannelListener1.ReceiveItemAndVerifySecurityAsyncResult`2.InnerTryReceiveCompletedCallback(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object state)
at System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
at System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)
at System.Net.LazyAsyncResult.Complete(IntPtr userToken)
at System.Net.LazyAsyncResult.ProtectedInvokeCallback(Object result, IntPtr userToken)
at System.Net.Security.NegotiateStream.ProcessFrameBody(Int32 readBytes, Byte[] buffer, Int32 offset, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.NegotiateStream.ReadCallback(AsyncProtocolRequest asyncRequest)
at System.Net.AsyncProtocolRequest.CompleteRequest(Int32 result)
at System.Net.FixedSizeReader.CheckCompletionBeforeNextRead(Int32 bytes)
at System.Net.FixedSizeReader.ReadCallback(IAsyncResult transportResult)
at System.Runtime.AsyncResult.Complete(Boolean completedSynchronously)
at System.ServiceModel.Channels.ConnectionStream.IOAsyncResult.OnAsyncIOComplete(Object state)
at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted(SocketAsyncEventArgs e)
at System.Net.Sockets.SocketAsyncEventArgs.FinishOperationSuccess(SocketError socketError, Int32 bytesTransferred, SocketFlags flags)
at System.Net.Sockets.SocketAsyncEventArgs.CompletionPortCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)

Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.GLJournalEntryImpl.Update(GLJournalEntryDataSet ds)
at Erp.Adapters.GLJournalEntryAdapter.OnUpdate()
at Ice.Lib.Framework.EpiBaseAdapter.Update()
at Erp.UI.App.GLJournalEntry.Transaction.Update(String lastViewName)

Error 10.2
Business Layer Exception

Invalid GL Account 1390|40|000|RDUSA|088 for Journal 836 Line 1: COA Segment Value 088 is not found for Segment Department.
Invalid GL Account 1390|40|000|RDUSA|088 for Journal 836 Line 2: COA Segment Value 088 is not found for Segment Department.

Exception caught in: Epicor.ServiceModel

Error Detail

Description: Invalid GL Account 1390|40|000|RDUSA|088 for Journal 836 Line 1: COA Segment Value 088 is not found for Segment Department.
Invalid GL Account 1390|40|000|RDUSA|088 for Journal 836 Line 2: COA Segment Value 088 is not found for Segment Department.

Program: Erp.Services.BO.GLJrnGrp.dll
Method: CheckBeforePost
Line Number: 1325
Column Number: 17

Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.GLJrnGrpImpl.CheckBeforePost(String groupID)
at Erp.Adapters.GLJrnGrpAdapter.CheckBeforePost(String groupID)

There is an indicator that the GL is invalid. It will not have a description.

Gary,

Probably not the easy fix you are looking for, but you could attach an event handler to the GridPasting event of the widget and do something like this pseudo-code:

private void yourGridName_GridPasting(object sender, Ice.Lib.Framework.GridPastingEventArgs args)
{
  // Grab the data in the clipboard
  IDataObject data = Clipboard.GetDataObject();
  string clipboardData = data.GetData(DataFormats.Text).ToString();

  if (clipboardData.Length > 1) {
    // Split on newlines and loop through the rows
   string[] splitRow = clipboardData.Split(new string[] { "\r\n" }, StringSplitOptions.None);
   foreach (string listEntry in splitRow) {
     // Split on the tabs
    string[] splitField = listEntry.Split('\t');

    if (splitField[0] != "") {
        // Run a query on whatever you are validating here
        bool recSelected = false;
	string whereClause = "Where clause here using the data in splitField'";
        // Not the 
	DataSet dsGL = SearchFunctions.listLookup(oTrans, "GLAccountAdapter", out recSelected, false, whereClause);
	if (!recSelected) {
	  args.Cancel = true;
          // Make sure you yell at your user really good here	
	}
    }
}

Hi Jason, if you paste in a line with an invalid Dynamic GL Segment, the GL Account Description fills in as if the GL account is valid. So this wouldn’t work for us. We use Dynamic Segments.

Hi Adam, we’ll try to add code like this to the GridPasting event, thanks.

Disappointed that Epicor took this validation away…unless there’s a new checkbox somewhere we’re not seeing.