Updatable BAQ OrderHead

I’m trying to make an updatable BAQ in Epicor that changes the Ship By Date in the order header and propagates the new date down the the order release ship by dates.
I can update the header, but the releases still show the old date.

The BAQ is only pointing to the Order Header table.

Does the uBAQ use the whole Order object, and not just the OrderHed?

I’m probably using the wrong terminology. I’m referring to Update tab on the BAQ where you select the business object. I think it shows as a tree structure.

One other thing to consider, does the ShipBy date just automatically update the Order lines/releases when the header changes? Or does it prompt the user?

In the normal Order Entry Screen it will prompt the user with a message asking if you want all the lines to be updated. I’ve tried selecting both Order Head and Order Details in the tree view and it hasn’t worked on updating the order release ship by date when testing the BAQ.

I just made a uBAQ to do some tests…

If the BAQ does not contain the OrderDtl table, updates to OrderHed.RequestDate do propagate through to OrderDtl and OrderRel (only if the Line or Release is open).

As soon as I added the OrderDtl table, the OrderDtl.RequestDate no longer updates. Not even for the one that includes the specific line.

Just after using “Get List” in BAQ Designer (i.e. original records)
image
(highlighting mine)

After editing the line, but before clicking "Update"
(changed OrderHed.ReqDAte from 1/14/19 to 1/23/19
image

After clicking "Update"
image

Notes:

  • The OdrerDtl.ReqDate did not change from the original setting of 1/19/19
  • The OrderHed.ReqDate for other rows of the same order do not reflect the change. hitting “Get List” causes a refresh and then all the other rows for this OrderNum now show the new OrderHed.ReqDate.

I can get the OrderDtl.ReqDate field to update (to match the value OrderHed.ReqDate was changed to) by setting the OrderDtl.ReqDate Expression as follows:

While that does cause the OrderDtl.ReqDate to update, only the LineNum that I changed (Line 4 in the prior images) is updated.

The BAQ / UBAQ execution does not understand the behaviors of the Business Logic and how the BAQ results could be altered by an update and as you have found, you need to manually refresh the BAQ data if the Update can change more than the single line being updated.

Testing in the BAQ Designer is not the same as the behavior seen in the Dashboard. The Dashboard does have some additional refresh rules - it still may not refresh the BAQ results for your use case but if you are interested in what your end-user experience will be, you should test in the DBD.

1 Like

It looks like I need to create a BPM that updates all the releases ReqDate to match the OrderHead.RequestedDate. Is there any easy way to do this?

Data change in the presentation layer will not change data in the table\DB due to field\table\DB constraints, a UD field must be used to store changed data and a simple update BPM must be used to update the underlying field/table

1 Like

So, what you’re saying is that I can’t make this BPM work, but if I change a UD field, then I can apply it to both the OrderHead.Requested date and the OrderRel.ReqDate?

My Current BPM (Not Working)
Condition:
When OrderHead.RequestedDate changes from Any to Another.

Set Field:
Set the OrderRel.ReqDate Field of All Rows to the OrderHead.RequestedDate Expression

Your BPM is not working because the date data in the underlying field OrderHead.Requested date …is not really changing (your original post)
If you have access to the table via SQL server Mgt studio…can you check by writing a simple update insert query on the OrderHead.reqdate field…to ensure you do can actually update this field…if it’s updatable you can use the BPM on change… to copy and paste the UD field dates

Not necessarily true. Epicor can restrict access to Sales Orders based on Territory access which is not enforced with a database trigger. A better test, for various reasons, is to update the field in Sales Order Entry to test security issues. Next, I would replace the Set Field action with a MessageBox to make sure your BPM is triggered at all with your condition.

Mark W.

Hi,
Did you ever get this work?

Jose

Not the way I’d like to, but we had a third party help create some BPMs using C# that would perform this task.

Could you share which process to make this work? is the bpm part of the ubaq or just a method/data directive?

i have a data directive to modify the order but as stated previously thats in the screen when its updated. Never have worked with ubaq bpms so i am trying to achieve what you did since our process requires someone to modify the dates after it was enter for shipping purposes.