We are using Landed Costs and Container Receipts. When a landed costs container is created and “Shipped” it basically stages the receipt with everything it needs other than Serial Numbers. I was planning on having the Buyers who created the landed costs container upload the Serial Number along with PackSlip, PONum,POLine, PORel, VendorNum, PurPoint.
When the Receiver goes into Container Receipt and “saves” a RcvDtl Line, I want to trigger a Data Directive to query UD24 to get the SerialNumbers associated with that container line and populate them for the user.
Essentially all they would have to do is save the line and then click Receive all
I did some traces and found a number of the BO I need to call to replicate what Epicor is doing when the receiver creates the Serial Numbers manually.
-
ERP.Proxy.BO.ReceiptImpl GetSelectSerailNumberParams
-
ERP.Proxy.BO.SelectSerialNumbersImpl GetSerialNumFormat
-
ERP.Proxy.BO.SelectedSerialNumbersImpl GetNextSN
-
ERP.Proxy.BO.SelectedSerialNumbersImpl CreateSerailNum
Repeat for total number of Serial Numbers = ContainerShipQTY
x) ERP.Proxy.BO.SelectedSerialNumbersImpl GetNextSN
xi) ERP.Proxy.BO.SelectedSerialNumbersImpl CreateSerailNum
.
.
.
-
ERP.Proxy.BO.ReceiptImpl ReceiveContainerUpdateUsingArriveDate
-
ERP.Proxy.BO.ReceiptImpl ReceiveContainer
I basically tried to create a Standard Data Directive on RcvDtl looking for an added line to RcvDtl that has a container ID populated.
Then I began to Invoke BO Methods and define associated TableSets for
Ice.UD24.GetRows Filling a UD24TableSet Variable
-
EPR.Receipt.GetSelectedSerialNumberParams Filling SelectedSerialNumbersParamsTableSet variable
-
Erp.SelectedSerailNaumbers.GetSerialNumFormat Filling a SelectedSerailNumbersTableSet variable
-
Erp.SelectedSerailNaumbers.GetNextSN Filling a SelectedSerailNumbersTableSet variable
-
Erp.SelectedSerailNaumbers.GetSerialNumFormat Filling a SelectedSerailNumbersTableSet variable
-
Erp.SelectedSerailNaumbers.CreateSerialNum Filling a SelectedSerailNumbersTableSet variable
I didn’t get much passed that as none of it seemed to work
Initially I got the Error that ‘SelectSerialNumbersParamsTableset’ exists in both 'Erp.Contracts.BO.Receipt and 'Erp.Contracts.BO.SelectedSerialNumbers
I removed the connections from all the BO I invoked other than the UD24 and added an Email notification to see what id the UD24 variable I created and attempted to populate. This the Error I got when I saved the Container Receipt
Business Layer Exception
The table ttRcvDtl has more than one record
Exception caught in: Epicor.ServiceModel
Error Detail
============
Correlation ID: 4bd336ba-75cc-4a48-b841-445178cf4426
Description: The table ttRcvDtl has more than one record
Program: Epicor.Customization.dll
Method: GetSingleRow
Line Number: 73
Column Number: 17
Table: ttRcvDtl
Client Stack Trace
==================
at Epicor.ServiceModel.Channels.ImplBase`1.ShouldRethrowNonRetryableException(Exception ex, DataSet[] dataSets)
at Erp.Proxy.BO.ReceiptImpl.ReceiveContainerUpdateUsingArriveDate(ReceiptDataSet ds, Int32 inContainerID, Nullable`1 ipArrivedDate, String inCreateNewPoRels, Boolean& outEshReceived, Boolean& outPartialReceipt, Boolean& outReceiveAll)
at Erp.Adapters.ReceiptAdapter.ReceiveContainerUpdateUsingArriveDate(Int32 inContainerID, Nullable`1 ipArrivedDate, String inCreateNewPoRels, Boolean& outEshReceived, Boolean& outPartialReceipt, Boolean& outReceiveAll)
at Erp.UI.App.ContainerReceipts.Transaction.Update()
So yeah…am I going about this the wrong way?