I did a similar using custom code on the CustShip.UpdateMaster method.
My client wanted to allow part to be packed, but not shipped.
If the ‘Ready To Invoice’ field was changed from false to true, then my code used custom code to query a UD field on the part table (could be any table) to see if it was on ‘Shipping Hold’ and then populated a variable declared in the BPM.
I then used the variable in a condition and conditionally raised an exception in the BPM, if the part was on shipping hold.
No, it was C#, but assuming you can write custom code in V9, the principle is the same.
I’m afraid I don’t have visibility of V9, but you may able to achieve a similar thing by calling the appropriate business object to get the sales order header info.
@Rowley150
check if you can use a query condition not less than one, put your field value true as criteria in inner joint link OrderHed and ttShipDtl
something like this
Epicor 9 is different of course, i have not created any query BPM in 9, i have plenty in 10 using C#, if you want i can send you an example and you try to convert it to ABL
thanks Al, but i don’t think should require ABL…i’m fairly sure it should be able to be done just via normal condition/action…i’m wondering if custship.update is the wrong method Or should it be a post processing bpm.
one more thing, i can not see OrderNum in ShipHead, the Order No., Line, Release exist in ShipDtl and it is important to link shipDtl table to the OrderHead, your method and pre trigger is right as i have used them to do similar thing and worked fine
I agree with Al. We have one on custship.update pre-processing. We’re on E10 now, but do indeed use a query condition and then C#. Ours is a date compare… “if we have a DO NOT SHIP B4 date entered on sales order release (Date02) and are not past it, then give message, throw exception”. I cannot see our old E9 bpm but do have copy of an export of it that I did prior to go-live on E10, from a couple years back. If you’d like me to email it mark, let me know your email.
could you not just use the hold order flag on the order header, and untick ‘Allow shipments for Orders on Hold’ in company config / materials / shipping-receiving ?
it looks like the problem revolves around the syntax in the condition.
i changed the ttshiphead to ttshipdtl and the error didn’t populate…however, it is fine-tuning the syntax…there are only 2 joins so it can’t be too tricky!..ttshipdtl.company = orderhed.company and ttshipdtl.ordernum = orderhed.ordernum
the syntax i’m using is now this:
It doesn’t error, but it doesn’t work either!..i just get the blue circle for about a minute so its recognising the bpm but i guess the syntax isn’t quite there.
for each ttShipDtl no-lock , each OrderHed no-lock where (ttShipDtl.Company = OrderHed.Company and ttShipDtl.OrderNum = OrderHed.OrderNum ) and OrderHed.CheckBox02 = true
@Rowley150
the logical condition should be “is not less than one” i.e. if find any records (one or more) which match this criteria raise the exception, may be your packnum has more than one thereby it is not triggering the exception,
the following syntax works but it now appears for every new order on a packslip?..(i’ve only got the checkbox applied to 1 sales order)
I changed it to not less than 1 too.
for each OrderHed no-lock , each ttshipdtl no-lock where (ttShipDtl.Company = OrderHed.Company and ttShipDtl.OrderNum = OrderHed.OrderNum) and OrderHed.CheckBox02 = true
i’m thinking this could work…if “import license required” is ticked…then the hold button is also ticked…i think that prevents the order being shipped.
At least this way both fields are from orderhed
I need to revisit this…here is what i did as per last post,
created a orderhed.checkbox02 field for import license required.
created a bpm to tick orderheld (on the order header tab) IF point 1) was ticked.
This works and stops orders being shipped, however i’ve just been told it prevents users allocating parts to the order if the order held is ticked!..GGGrrrr!!!
Essentially, we want the product to still be manufactured and go all the way through the system but stop at the despatch dept if there is an import license is required
i’ve tried over and over with method and data directive bpms with no joy.
I guess the goal is still to stop it at the Customer Shipment process
no problem @Rowley150, that is why i suggest to link your BPM action with just this UD field, nothing more, i have designed a BPM checks a UD field in PartLot table if true stops the transaction, happy to share the code with you mate, then you can alter it to read from the Sales Order table.YourUD field instead.