Try to decide if an external BPM is worth the effort and cost

I need your help/advice

The purpose of this BPM is to update the field Order Product Line price when the Quote Line Product price is changed.

I am doing my BPM on the Post-Processing action of the method Erp.Quote.Update by using the “Invoke BO Method”; until here I tried to enabled and save my BPM but when I click on the save button I receive the following error:

Error CS0433: The type ‘Erp.Tablesets.ETCAddrValidationTableset’ exists in both ‘c:\inetpub\wwwroot\XXXXX\Server\Assemblies\Erp.Contracts.BO.SalesOrder.dll’ and ‘c:\inetpub\wwwroot\XXXXX\Server\Assemblies\Erp.Contracts.BO.Quote.dll’ [CustomizationAdapter.cs(264,30)]
Error CS0433: The type ‘Erp.Tablesets.QuoteQtyTable’ exists in both

According to Epicor support this is a know issue and has not been corrected in 10.2? Support suggest an External BPM or a Data Directive BPM.

That said:

  1. What do I need to create an External BPM method (DLL)? I do have Visual Studio, but not sure if I need Epicor SDK?

  2. Is there a way for the Method BPM to call a Data Directive BPM? I have to prompt the user to confirm before updating the Sales Order Line price.

Thanks

I would just do a Standard data directive, with a condition of the price change, and then invoke your Order BO from that directive.

You can just use a ubaq can call it from your BPM to get around this

Thank for the suggestion. I wound which will be faster a call to an UBAQ or LINIQ from the method BPM? I would appreciate any pros and cons especially regarding which approach will trigger the auto-update to the Sales Order total = Line Price * Quantity.

Mazin

Linq will bypass the BO you need to invoke the BO logic which you can do in a UBAQ bpm

I like it. Thank you.

Just making sure, there is no way to call an UBAQ from a Method BPM by any of the available Callers (tools). I assume you are referring to a C# block with code to call the UBAQ and passing it the parameters.

It would be easier (I think) to call the UBAQ from a client side customization instead of a BPM. You can set any of many different triggers that are available in the client customization.

edit But I supposed if you are try to stop a transaction, that may not work as well. I’m not sure.

technically you can call the dynamic query BO in a BPM, but I’ve never gotten it to work.

I’ve called a standard BAQ from a client customization but not UBAQ. Can you point me to an example post or resource? Thx.

Well, @dhewi talks about it here. However, in your case, since you are just putting a BPM in place and not actually changing the results of the data that comes back (the BPM is going to do it for you right?), I don’t know if it’s any different then just calling the BPM. I’m pretty sure the BPM will still fire.

I am confused now.

  1. If I call the UBAQ from the customization then why do I need to use the BPM?

  2. Is the c# code example you provided for the BPM or Customization script?
    I am also confused as to why I need to reference and bind a grid.

I have a UBAQ have two parameters the sales order number and new price line and updates accordingly.

I read in previous post that you will have to bind the UBAQ to a dashboard grid before you can use it. This sounds very complicated. Maybe I just need to update the record using LINQ. Wow?

The BPM is on the Ubaq. It’s not a UBAQ like you would normally expect, it’s one where you select Advanced BPM Update only. Then you put the BPM in there. That BPM can do work for you. You can pass in some parameters to get information that you need to help in that BPM. Then you can call BO’s in there.

You can add the Invoke BO Method Widget and then select Invoke Ice.DynamicQuery.ExecuteByID and\or Update

2 Likes

When you run the UBaq, the results are stored in the adapter, I run them and use the results to feed BO’s on my customizations without displaying the grid. But in your case, when you just want to be able to call both BO’s in one BPM, you can run a query to get the info from the Quote, then run the sales order BO to set the prices on the sales order line. That way you don’t have to run both the Quote and Sales order BO in one BPM, which is what is giving you problems.

Or try what @danbedwards suggests and try to run the DynamicQuery BO in your original BPM.

Brandon this very Back To The Future heavy.

So, do I understand you correctly:

  1. Create a BAQ. But use the Advanced BPM Directive Configuration option.

  2. In the Updateable BAQ Method Directives - Add a Post-Processing method.

    a. In this Post-Processing method add the BO Caller block widget to update the Sales Order Price line.

  3. In my BPM (for Quote Update when the price changes) call the BO to run dynamic query. Which will run the BAQ and automatically run the BPM (BO to update the Sales Order Price).

1 Like

right. The goal is to separate the BO’s because the quote and sales BO don’t play nice together.

I will start working on coding together this flex capacitor design tomorrow. I will keep you posted. :clock7:

Thx.

1 Like

Starting working on this. First test to create a BAQ. But use the Advanced BPM Directive Configuration option. In the BPM, I selected to message box with a query field from the query results. Made sure the BPM was enabled.

Then I ran the BAQ directly with input parameters to query the OrderDtl table. One row was returned but no message box?

Where did you put the BPM?