BPM/Function Error

I have tried this in both BPM and Functions (yes, I know they are basically the same, but…) and I get this error that I am unsure how to fix:

There is at least one compilation error.
UpdateMaster.CommonTypes.cs(390,33): error CS0433: The type ‘SelectedSerialNumbersTable’ exists in both ‘Erp.Contracts.BO.CustShip, Version=10.2.700.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ and ‘Erp.Contracts.BO.SalesOrder, Version=10.2.700.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’
UpdateMaster.CommonTypes.cs(400,33): error CS0433: The type ‘SNFormatTable’ exists in both ‘Erp.Contracts.BO.CustShip, Version=10.2.700.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ and ‘Erp.Contracts.BO.SalesOrder, Version=10.2.700.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’
CustomizationAdapter.cs(498,30): error CS0433: The type ‘SelectSerialNumbersParamsTableset’ exists in both ‘Erp.Contracts.BO.CustShip, Version=10.2.700.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’ and ‘Erp.Contracts.BO.SalesOrder, Version=10.2.700.0, Culture=neutral, PublicKeyToken=5d3fa3c7105d7992’
CustomizationAdapter.cs(9,138): error CS0738: ‘CustShipSvcCustomization’ does not implement interface member ‘CustShipSvcContract.GetSelectSerialNumbersParams(string, decimal, string, int, int, string, string, string, string, string, bool, int, int, int, Guid)’. ‘CustShipSvcCustomization.GetSelectSerialNumbersParams(string, decimal, string, int, int, string, string, string, string, string, bool, int, int, int, Guid)’ cannot implement ‘CustShipSvcContract.GetSelectSerialNumbersParams(string, decimal, string, int, int, string, string, string, string, string, bool, int, int, int, Guid)’ because it does not have the matching return type of ‘SelectSerialNumbersParamsTableset’.

No sure what you’re trying to do there but CustShip.SelectedSerialNumbers and SalesOrder.SelectedSerialNumbers are NOT the same. What do you want to do?

Trying to do this:

If, on Cust Shipment Entry, the checkbox “shipped” is checked, then change three fields in OrderHed.

So I started with CustShip, set my requirement, then invoked a BO OrderHed and trying to set those three fields.

This is a well.known issue with no easy work around. (Look around the forum for that same error)

You need to split the function into two spare libraries one dealing with the order and one with the shipment then call one from the other . They will have to.be in separate libraries

3 Likes

Well then…

Thank you for the info on how to solve. So create 2 separate for each piece, then call one from the other in its function? Correct?

Correct!

1 Like

UPDATE: Figured it out! Had to add the library under the Reference tab. :person_shrugging: :pensive:

Can you lead to the info on how define the library? While trying to invoke the Function, I keep getting the error There are no library references defined.

I have the OrderLibrary being called inside the CustShip Function. I got to thinking, though, how is the correct parameters passed? Example: OrderHed.OrderNum=ShipHead.OTSOrderNum; OrderHed.Custnum=CustShip.CustNum, etc.

What do you mean… you pass the parameters in your function call… #Confused

Maybe I am overthinking, and I am probably the one confused.

But, in the first function, OrderChange, it invokes the OrderHed tables, thenit sets the fields.

In the second Fucntion, CustShp, I have it setup to it invokes the CustShip tables and then I have the condition set to if ReadyToInvoice of the changed row is true, then run the OrderChange function.

Am I to assume the basic info to connect these, like order number, are passed on automatically? Or did I not setup the Order one correctly? Wanting to make sure this runs only for the order being shipped and not for all orders.

I mean you have to pass the OrderNumber etc into your second function it can’t magically know which order you want to use.

1 Like

Exactly! My question is where/how do I pass that along at in the function? If there is documentation, I am more then willing to read it. But, wanted to ask.

When you setup your function signature you define the parameters (input) that you want ot pass into the function then on the Widget in your BPM (or the other function) you should have the option to setup / pass in those parameters.

1 Like

That is what I was wondering. Didn’t know if I put it in the OrderChange, if it would give me the option in the CstShp Function. Below is what you are referring to, correct?

Correct.

Thank You!

Have you seen this before? I have ShipDtl in the references of the function. Or is this from the configured parameters in the Invoke BO method?

Business Layer Exception

There are no records in the table CstShp.ShipDtl

Exception caught in: Epicor.ServiceModel

Error Detail

Correlation ID: 8c5a5fb8-31ac-461a-8f37-c3739d4caa18
Description: There are no records in the table CstShp.ShipDtl
Program: Epicor.Customization.dll
Method: GetSingleRow
Line Number: 68
Column Number: 17
Table: CstShp.ShipDtl

Client Stack Trace

at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.CustShipImpl.UpdateMaster(CustShipDataSet ds, Boolean doValidateCreditHold, Boolean doCheckShipDtl, Boolean doLotValidation, Boolean doCheckOrderComplete, Boolean doPostUpdate, Boolean doCheckCompliance,
Boolean ipShippedFlagChanged, Int32 ipPackNum, Int32 ipBTCustNum, String& opReleaseMessage, String& opCompleteMessage, String& opShippingMessage, String& opLotMessage, String& opInventoryMessage, String& opLockQtyMessage,
String& opAllocationMessage, String& opPartListNeedsAttr, String& opLotListNeedsAttr, String& shipCreditMsg, Boolean& cError, Boolean& compError, String& msg, String& opPostUpdMessage, Boolean& updateComplete,
Boolean& checkComplianceError, Boolean& changeStatusError, Boolean& checkShipDtlAgain)
at Erp.Adapters.CustShipAdapter.UpdateMaster(Boolean doValidateCreditHold, Boolean doCheckShipDtl, Boolean doLotValidation, Boolean doCheckOrderComplete, Boolean doPostUpdate, Boolean doCheckCompliance,
Boolean ipShippedFlagChanged, Int32 ipPackNum, Int32 ipBTCustNum, String& opReleaseMessage, String& opCompleteMessage, String& opShippingMessage, String& opLotMessage, String& opInventoryMessage, String& opLockQtyMessage,
String& opAllocationMessage, String& opPartListNeedsAttr, String& opLotListNeedsAttr, String& shipCreditMsg, Boolean& cError, Boolean& compError, String& msg, String& opPostUpdMessage, Boolean& updateComplete,
Boolean& checkComplianceError, Boolean& changeStatusError, Boolean& checkShipDtlAgain)
at Erp.UI.App.CustShipEntry.Transaction.Update()

That error as you can see in the call stack is coming from your call to CustShip.UpdateMaster.

WAs curious, using functions, can you have an UBAQ get the list, change a filed, and then update? The more I am using the functions, the more I am thinking of ways to use this. That is one of them.

Why bother with a UBAQ at all… do the work in the function itself

1 Like