WCF to Set Order Shipment as Ready to Invoice


(Doreen Corriera) #1

I am trying to mark a shipping header record as ready to invoice using Epicor’s service calls. I traced the service calls while processing a shipping pack slip as shipped and duplicated the calls. When I try to call UpdateMaster on the shipping record with ReadyToInvoice set to true, it returns a message ‘Value cannot be null. Parameter name: fromItem’. How can I tell what field needs to be set for fromItem not to be null. I do not see a parameter to UpdateMaster or a field in the erp.ShipHead table called fromItem.


(Jeremy Chance) #2

In the same boat as you. I’m building a BPM that Un-Ships a PackID. When I call UpdateMaster, I get the same error. If I figure out a solution I’ll post it here for you.

The error says the fromItem is indeed a paramter used in a copy method:
“Server Trace Stack: at Epicor.Data.BufferCopy.Copy(Object fromItem, Object toItem, Boolean includeSysRowID)”.


(Chris Conn) #3

Can you not just use Update so all of the extra tables arent needed?


(Jeremy Chance) #4

The BPM I’m building goes off of an event in a UDTable. So from that BO, I have to bring in the CustShipsvc to make changes to ShipHead. If I set the BPM to simply update ShipHead.ReadyToInvoice = false, the record is deleted for some reason (code below) :thinking:. So rather than doing this, I figured I needed to use UpdateMaster.

CustShipDS = CustShipsvc.GetByID(vPackNum);
var ShipHeadRow = CustShipDS.ShipHead.FirstOrDefault();
ShipHeadRow.ReadyToInvoice = false;
ShipHeadRow.RowMod = “U”;
CustShipsvc.Update(ref CustShipDS);


(Chris Conn) #5

That is scary that the record is deleted!

Double check a trace when changing the ReadyToInvoice from the UI to make sure it isnt expecting some other call.


(Doreen Corriera) #6

I also tried to use Update rather than UpdateMaster. I don’t think the ShipHead record is actually deleted because I can still see it in the database, but it does look like it gets corrupted since you can no longer retrieve it from the order tracker.

I’ve had a case open with Epicor for quite some time concerning this but have yet to receive any feedback.


(Jeremy Chance) #7

Ya, long story short, it’s looking like you have to use UpdateMaster.


(Jeremy Chance) #8

Hi Doreen, May I ask which version of Epicor you’re on? I’m on 10.0, so perhaps this is a 10.0 thing?


(Doreen Corriera) #9

10.1.600 – upgraded from 9 about a month ago. Did not have an issue in 9


(Jeremy Chance) #10

Got it. Looks like the hunt continues. Again, if I find something, I’ll be sure to post it.