We are given the task to restrict packing slip if certain documents is not being sent . C of C or FAI , the problem is these documents are sent out through email or shipment . We came up with a solution through BPM (If we can get it to work) . These FAI documents are per Customer PO , so we decided to use the UD: Example OrderRel.Checkbox10 labeled “FAI Required” in the Release tab is checked if the Customer requires the FAI Documents (Sales). Than creating an updatable dashboard for the QA to check the ShipHead.CheckBox10 if documents received (QA) . Thus allowing the packing slip (Shipping).
For Customer which Requires Documents
OrderRel.Checkbox10 = Checked (FAI Required)
ShipHead.CheckBox10 = Checked (Documents Sent)
ttShipHead.ReadyToInvoice = False to True = Shipped
If 1 is checked and 2 is not , raise exception when Shipped.
For Customer which do NOT Requires Documents
OrderRel.Checkbox10 = NOT Checked
Bypass all conditions and ship as usual
Configured as below: CustShip.UpdateMaster
Conditions:
number of rows in the ‘FAI’ query is less than 1
and the ShipHead.CheckBox10 field of the changed row is equal to the false expression
and the ttShipHead.ReadyToInvoice field has been changed from False to True
Action:
raise exception based on the FAI template
FAI Query for each ShipHead no-lock , each ShipDtl no-lock where ShipHead.Company = ShipDtl.Company and ShipHead.PackNum = ShipDtl.PackNum , each OrderRel no-lock where ShipDtl.Company = OrderRel.Company and ShipDtl.OrderNum = OrderRel.OrderNum and ShipDtl.OrderLine = OrderRel.OrderLine and ShipDtl.OrderRelNum = OrderRel.OrderRelNum and OrderRel.CheckBox10 = yes
The issue above is no matter if the OrderRel.CheckBox10 is checked or unchecked we are still getting the exception window.
Any help will be greatly appreciated . Thank you
Hi @ckrusen . Packing can be created as normal but when the above conditions not met for FAI Required . Exception triggers when ttShipHead.ReadyToInvoice (Shipped) False To True
Also, have you run a trace to make sure the update happens just once?
I recall that marking a packer as shipped causes something to happen before you even save the packer. Maybe all the conditions you’re looking for arent happenong at tge same time.
I do this kind of check in the DD on ShipHead in code. I had a couple close, so I took them and made the condition you need. I am with Calvin that there is a lot behind the scenes happening and MasterUpdate might not work for this.
Greg
/* alert on FAI docs not sent */
For first ttShipHead no-lock ,
Each ShipDtl no-lock where ttShipHead.Company = ShipDtl.Company and ttShipHead.PackNum = ShipDtl.PackNum.
Find first OrderRel where ShipDtl.Company = OrderRel.Company and
ShipDtl.OrderNum = OrderRel.OrderNum and ShipDtl.OrderLine = OrderRel.OrderLine and
ShipDtl.OrderRelNum = OrderRel.OrderRelNum no-lock no-error.
If available ( OrderRel ) Then Do:
If OrderRel.CheckBox10 = true and ttShiphead.CheckBox10 = false Then Do:
def var Msg as character init ''.
Msg = "Docs not sent yet".
{lib/PublishEx.i &ExMsg = Msg &ExType = {&MESSAGE_ERR}}.
End.
End.
End.