Stop shipment if field is true

epicor version 9.05.701

i need a BPM that will stop a customer shipment being made if the OrderHed.Checkbox01 field is true

I looked in the bpm method directives list under custship. but anything relating to an order didn’t bring in the ttOrderHed table.

Could anybody shed some light.
Thanks.

Hi Mark,

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.

Best Regards,

Andrew.
.

Thanks Andrew, …did you use ABL code?

There must be a way of just doing a straight forward bpm?

Hi Mark,

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.

Best Regards,

Andrew.

@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

thank you
i’m getting closer!..

here is my bpm:

however, when i test it in customer shipment entry i get this error:

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

1 Like

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.

Nancy

1 Like

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 ?

2 Likes

Hi Nancy that would be great.
My email is markrowley@prior.com

thank you

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

We wanted to stop shipment if the part was placed on hold - used a post process with condition for hold

.

@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,

image

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

may have to approach this another way…

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,

  1. created a orderhed.checkbox02 field for import license required.
  2. 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

Im very apologetic for opening this once more!

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.

Yes please, that would be much appreciated.