CustShip.UpdateMaster

I have a Method Directive that I am generating and email on. I can get all of the data needed except for the ShipDtl PoNum and OrderNum. I can call that table and put a variable but no data is being populated in the email. It feels like the ShipDtl is not being populated at this point. When I did a trace it was on Erp.Proxy.BO.CustShipImpl
UpdateMaster

Are you sure there is data in there for that field? Is this Make Direct or Make To Stock?

Make to Order

When I look at Sales order for that job it has a PO and OrderNumber.

I don’t think PO really exists in ShipDtl. I don’t use tracing for emails they are always on a standard DD for me.

I tried this on UpdateMaster and the email would not fire for me, so I moved it to a standard DD on ShipHead to test. If you are getting the email, but not the packline data then this should work where you have it.
I used a couple of Set BPM Data fields to get the missing data. First one sets Number01 to the OrderNum then the second one uses Number01 to get the PO from OrderHed.


image

Db.ShipDtl.Where(row=> row.Company == CompanyID && row.PackNum == ttShipHeadRow.PackNum && row.PackLine == 1).Select(s => s.OrderNum).FirstOrDefault()
Db.OrderHed.Where(row=> row.Company == CompanyID && row.OrderNum == callContextBpmData.Number01).Select(s => s.PONum).FirstOrDefault()
1 Like