Tableset exists in both

I am doing a Method Directive Post-Processing on Erp.BO.Labor.Update and added the following code (referencing Erp.Contracts.BO.ReceiptsFromMfg).
Getting an error saying:
SelectSerialNumbersParamsTableset exists in both Erp.Contracts.BO.Labor and Erp.Contracts.BO.ReceiptsFromMfg

using (Erp.Contracts.ReceiptsFromMfgSvcContract receiptMfgSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.ReceiptsFromMfgSvcContract>(Db))
{
  foreach(var r in ds.LaborDtl)
  {
  
  
  }
}

I am getting this error when trying to save back at the Method Directive screen:

System Information

==================

Form Name: Method Directives
Customization Name:
Menu ID: BPMN1200
Software Version: 4.3.200.0

============

Server Side Exception

There is at least one compilation error.
CustomizationAdapter.cs(503,30): error CS0433: The type ‘SelectSerialNumbersParamsTableset’ exists in both ‘Erp.Contracts.BO.Labor, Version=11.3.200.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ and ‘Erp.Contracts.BO.ReceiptsFromMfg, Version=11.3.200.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’
CustomizationAdapter.cs(9,132): error CS0738: ‘LaborSvcCustomization’ does not implement interface member ‘LaborSvcContract.GetSelectSerialNumbersParams(ref LaborTableset, int)’. ‘LaborSvcCustomization.GetSelectSerialNumbersParams(ref LaborTableset, int)’ cannot implement ‘LaborSvcContract.GetSelectSerialNumbersParams(ref LaborTableset, int)’ because it does not have the matching return type of ‘SelectSerialNumbersParamsTableset’.

Exception caught in: Epicor.ServiceModel

Error Detail

============

##!Correlation ID:##! 0b04446d-f7ca-4272-ba18-f60e0ab84400
##!Description:##! There is at least one compilation error.
##!Details:##!
CustomizationAdapter.cs(503,30): error CS0433: The type ‘SelectSerialNumbersParamsTableset’ exists in both ‘Erp.Contracts.BO.Labor, Version=11.3.200.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ and ‘Erp.Contracts.BO.ReceiptsFromMfg, Version=11.3.200.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’
CustomizationAdapter.cs(9,132): error CS0738: ‘LaborSvcCustomization’ does not implement interface member ‘LaborSvcContract.GetSelectSerialNumbersParams(ref LaborTableset, int)’. ‘LaborSvcCustomization.GetSelectSerialNumbersParams(ref LaborTableset, int)’ cannot implement ‘LaborSvcContract.GetSelectSerialNumbersParams(ref LaborTableset, int)’ because it does not have the matching return type of ‘SelectSerialNumbersParamsTableset’.
##!Program:##! Epicor.Customization.dll
##!Method:##! MoveNext
##!Line Number:##! 73
##!Column Number:##! 17

Client Stack Trace

==================
at Epicor.ServiceModel.Channels.ImplBase.CallWithCommunicationFailureRetry(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, RestRpcValueSerializer serializer)
at Epicor.ServiceModel.Channels.ImplBase.CallWithMultistepBpmHandling(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Epicor.ServiceModel.Channels.ImplBase.Call(String methodName, ProxyValuesIn valuesIn, ProxyValuesOut valuesOut, Boolean useSparseCopy)
at Ice.Proxy.BO.BpMethodImpl.Update(BpMethodDataSet ds)
at Ice.Adapters.BpMethodAdapter.OnUpdate()
at Ice.Lib.Framework.EpiBaseAdapter.Update()
at Ice.UI.App.BpMethodEntry.Transactions.MainTransactionBase.adapterUpdate()

The problem here is that you are in the context of BO 1 (Labor) and you are bringing another BO into context, but both BOs define the same object, so you get a collision.

One workaround for that is to call the other BO in a function, and call the function from your BPM.

3 Likes

This comes up a lot:

https://www.epiusers.help/search?q=Tableset%20%22exists%20in%20both%22%20order%3Alatest