BPM to not ship earlierly than the request day

Code is OpenEdge Progress not pseudo code or C#.  Epicor 9.05 has progress as its back-end code.

Jim Kinneman
Encompass Solutions, Inc.

The customer does not want shipments before the promise date or they may not accept the delivery. We hope that the CSU person can have warning message pop up from within shipment entry that would remind them that, for this shiptonum id, no early shipments allowed. 


I would like to make a permanent note on the following OrderHed.ShipToNum MA80 or OrderHed.ShipToNum VAR14

 

"Varian early acceptance date is 4 days only.  Adjust
dates accordingly when shipping"


I did try to create a BPM Pre-Processing. Method Code: CustShip.Update


Condition: number of rows in the “CheckDate” query is not less than 1


for each ttShipHead no-lock 

where (ttShipHead.ShipToNum = ‘VAR14’ Or ttShipHead.ShipToNum = ‘MA80’ ) 

And ttShipHead.ShipDate < (OrderHed.RequestDate - 4) , 

each OrderHed no-lock 

where (ttShipHead.Company = OrderHed.Company 

And ttShipHead.OrderNum = OrderHed.OrderNum )


Action: show informational message based on the For this customer id, no early shipments allowed. template


Somehow, it does not work.  Please help to give some advice.

Thanks,

Quy Dang


Start with just a message popup with NO conditions to see that you are actually getting the Update method to fire.  Then add a piece at a time to your code until either the message goes away or things work.  I'd leave the date math until last.

You may need to move the date calculation into the where portion of OrderHed.

Jim Kinneman
Encompass Solutions, Inc.
Thanks Jim:
My issue now is where (ttShipHead.ShipToNum = 'VAR14' Or ttShipHead.ShipToNum = 'MA80' ) 
the real field is OrderHed.ShipToNum instead. But after I change to where (ttOrderHed.ShipToNum = 'VAR14' Or ttOrderHed.ShipToNum = 'MA80' ), the query went wrong. 

Take out the offending piece and as part of the popup display the values that are in the shipto number fields.  Wouldn't be the first time what we expect to be there isn't there or in another form.

Jim Kinneman
Encompass Solutions, Inc.

Well if this is C#, your query needs to be ttShipHead.ShipToNum == 'VAR14' Or ttShipHead.ShipToNum == 'MA80'


needs the double equals.


It would also help to see all of the BPM code. not the psuedo code. thanks.