Use AppvoveAll for EngWorkBench

Hi everyone.
Please help me with AppvoveAll , for EPICOR 10.1.600.11 version.
I am using this custom code to work with EngWorkBench object.
The ApproveAll and CheckIn functions are calling in a code, after all WB manipulations completed.


if (ewb_adapter.ApproveAll(ioTransport.STRECO, ipPartNum, ipRevisionNum, “”, ipAsOfDateNow,true,true,true,false,true, out strRet))
{
if (!ewb_adapter.CheckIn(ipGroupID, ipPartNum, ipRevisionNum, ipAltMethod, ipAsOfDate, ipCompleteTree, ipValidPassword,
ipReturn, ipGetDatasetForTree, ipUseMethodForParts, ipAuditText, out opMessage))
{
bret = false;
AddError(ioTransport, "EngWorkBenchAdapter.CheckIn() returned false, PartNum: " + ipPartNum);
}
}


This code perfectly workes for all EPICOR 10 previous versions, but for 10.1.600.11 ApproveAll API started to generate error, accomplished by BPM error dialog.
I did try to use ChangeECORevApproved api instead, but the same error dialog appeared.
Here is message from the error dialog.


All materials must be Part Master parts for the ‘TM127A25475-S0010005’ part number ‘191215114458’ revision




Business Layer Exception

All materials must be Part Master parts for the ‘TM127A25475-S0010005’ part number ‘191215114458’ revision

Exception caught in: Epicor.ServiceModel

Error Detail

Description: All materials must be Part Master parts for the ‘TM127A25475-S0010005’ part number ‘191215114458’ revision
Program: Erp.Services.BO.EngWorkBench.dll
Method: RequestApproveExternalMESValidation
Line Number: 2722
Column Number: 17
Server Trace Stack: at Erp.Services.BO.EngWorkBenchSvc.RequestApproveExternalMESValidation(String groupID) in C:_Releases\ERP\UD10.1.600.11\Source\Server\Services\BO\EngWorkBench\EngWorkBench.cs:line 2722
at Erp.Services.BO.EngWorkBenchSvc.ApproveAll(String ipGroupID, String ipPartNum, String ipRevisionNum, String ipAltMethod, Nullable1 ipAsOfDate, Boolean ipCompleteTree, Boolean ipReturn, Boolean ipGetDatasetForTree, Boolean ipUseMethodForParts, Boolean ipValidPassword, String& opResultString) in C:\_Releases\ERP\UD10.1.600.11\Source\Server\Services\BO\EngWorkBench\EngWorkBench.cs:line 2688 at Erp.Services.BO.EngWorkBenchSvcFacade.ApproveAll(String ipGroupID, String ipPartNum, String ipRevisionNum, String ipAltMethod, Nullable1 ipAsOfDate, Boolean ipCompleteTree, Boolean ipReturn, Boolean ipGetDatasetForTree, Boolean ipUseMethodForParts, Boolean ipValidPassword, String& opResultString) in C:_Releases\ERP\UD10.1.600.11\Source\Server\Services\BO\EngWorkBench\EngWorkBenchSvcFacade.cs:line 140
at SyncInvokeApproveAll(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.600.11\Source\Framework\Epicor.System\Hosting\OperationBoundInvoker.cs:line 59 at Epicor.Hosting.OperationBoundInvoker.Invoke(Object instance, Func2 func) in C:_Releases\ICE\3.1.600.11\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.600.11\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.ReceiveItemAndVerifySecurityAsyncResult2.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.ImplBase1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets) at Erp.Proxy.BO.EngWorkBenchImpl.ApproveAll(String ipGroupID, String ipPartNum, String ipRevisionNum, String ipAltMethod, Nullable1 ipAsOfDate, Boolean ipCompleteTree, Boolean ipReturn, Boolean ipGetDatasetForTree, Boolean ipUseMethodForParts, Boolean ipValidPassword, String& opResultString)
at Erp.Adapters.EngWorkBenchAdapter.ApproveAll(String ipGroupID, String ipPartNum, String ipRevisionNum, String ipAltMethod, DateTime ipAsOfDate, Boolean ipCompleteTree, Boolean ipReturn, Boolean ipGetDatasetForTree, Boolean ipUseMethodForParts, Boolean ipValidPassword, String& opResultString)

We had a problem when we upgraded from 10.0 to 10.1 where the approve all looks at the whole ECO table (not PartMtl table) and if there were parts with case mismatches (upper and lowercase). Even though it wasn’t something you were working on.

Try this, if you create a brand new ECO group do you get the same error? Just make the group, check something out, then check it back in using the approve/check in all feature.

if that does work, to for your old ECO group to work, you will have to check out each part that shows up on the error and check them back in, that will fix the problem parts.