BPM help

Epicor version 9.05.701

Requirements: If the OrderHed.HDCaseNum field of the added row is greater than the 1 expression THEN default (set) the OrderRel.WarehouseCode field to the RMA warehouse.

Problem: when i try to do an “in transaction” data directive, i choose the orderhed table but im not able to see the order rel fields etc.

Does this need to be done via ABL?
Any help would be much appreciated.

I would give it a try as a Standard Directive. You may have more options there. Hope this helps.

Hi Mark,

In E9, we found that data directives slowed the processing speed significantly and went with method directives where able, as they seemed to run much more efficiently.

That said, could you use the Sales Order update method? I would think post processing would do it.

Nancy

Just tried Jeremy’s idea…but that didn’t work, (no option to set the field).

I’ll try Nancy’s next.

Thanks for the feedback guys.

Hi Nancy,

I was hoping to see something like: “the specified field of the added row is equal to X”…in the conditions

I think you need to use the “number of rows in the designed query…” condition. In the query, is where your condition will be applied.

1 Like

Hi Guys,

This is what i’ve got but i must be missing something as its not doing it just yet.

Releases get added behind the scenes, so i don’t think you will see the Add happen. Is the case being added to the sales order or is the sales order being made from the case?

If the case number is being added you can use case has been changed from any to any to enable a post processing directive and use the abl code below.

Greg

For Each ttOrderHed, 
		Each OrderDtl fields( OrderNum )  where OrderDtl.OrderNum = ttOrderHed.OrderNum and OrderDtl.Company = ttOrderHed.Company and OrderDtl.OrderLine = OrderDtl.OrderLine,
		Each OrderRel fields( WareHouseCode )  where OrderRel.OrderNum = ttOrderHed.OrderNum and OrderRel.Company = ttOrderHed.Company and OrderRel.OrderLine = OrderRel.OrderLine 
				and OrderRel.OrderRelNum = OrderRel.OrderRelNum.


				
				
				Assign OrderRel.WarehouseCode = "RMA".
							 

End.
1 Like

Thanks Greg,
The order is being created from the case.

So the first step is to trace the order being created and see what methods are being used.
First put an info message on it to be sure it is firing. You can waste a lot of time debugging code that never will work.
Once you know that method is firing then we can work on the setting of the fields with abl code.

3 Likes

Greg is spot on with recommending to do this in abl. using the built in method directive gui isnt gonna give you what you want. Greg’s code is the most efficient way to do what you want to do.

Hi Greg,
This one works for the order release, but admittedly there is no condition on this one:

And then in terms of notifiications, this one works:

Ok, so can you add a check for case num in the top one and be good?

Hi Greg,

Firstly, i thought to try the below (with no conditions, just to see if it’d work) but sadly it didn’t.
I started with added row, then moved it to updated row and then changed row but none made any difference. Even selecting all rows didn’t force it.

I’ve managed to get an information message up using the below:

Just to confirm - this data directive notification works for only orders created from a case (which is what i need)…It doesn’t work when you just go to order entry and create a new order, which is good.

This is an indication that the CONDITION applied works.

I’ve taken some ABL script from another bpm we had in place and modified it, but when i came to validate it, it returned an error.


For each ttOrderRel where ttOrderRel.Rowmod = ‘A’ no-lock.

If ttOrderHed.HDCaseNum > ‘1’ Then Do:

/* Set Order Release Warehouse Defaults */

Assign ttOrderRel.WarehouseCode = “RMA”.
Assign ttOrderRel.WarehouseCodeDescription = “RMA Warehouse”.

End.


Maybe you don’t have the tt version of the OrderHed at this point in time? I would try using the orderhed table without the tt, but you might need to get the right orderhed record via the order number to do the inequality,

HTH!
Nancy

1 Like

To go off of what Nancy said, you can generally find what your available temporary tables are by performing the following steps:

  1. In the Method/Data Directive, add a Pre-Processing/Standard record.

  2. Add the “The specified field of the changed row…” condition.

  3. Select the “Specified” field followed by the “Table” field in the popup box. From here it should list all of your available temporary tables to access at the time of this Data/Method Directive.

Note: Since you should most likely be utilizing the “OrderHed” instead of “ttOrderHed” table, I would make sure to try it on both the “Standard” and “In-Transaction” options (assuming that you are sticking with a Data Directive instead of a Method Directive) if your first choice doesn’t work.

You’ll need to look up the OrderHed table in the ABL code. Something like:

For first OrderHed where OrderHed.Company = cur-comp AND OrderHed.OrderNum = ttOrderRel.OrderNum no-lock.
if available OrderHed then do:

  • your if condition
  • your ttOrderRel assign

end.
end.