Quote dataset refresh in post pr BPM

Hi everyone,

I am trying to force a refresh in the post processing BPM as I am constantly getting the “Row has been modified by another user…” error.
This is what I have done but the screen does not refresh, I still get the error and the message in the BPM is not showing. Can anyone help me please?

Regards

Adrian.

try using a local variable for quotenum and set it during the pre processing and pass the local to the “in” for your post processing. I believe that temp table values are cleared out before the post processing phase of the bpm

Sorry I think I misread. Are you trying to force a screen refresh on the quote UI from a bpm? This cannot be done from the server level and could be implemented as a form customization

1 Like
3 Likes

I stand corrected then! This is pretty cool

1 Like

Thanks for your responses Aaron and Theodore. Yes I am trying to force a refresh. I thought my BPM was doing what you suggested Theodore. Are you saying then Aaron that it will not work? How do I go about implementing it as a customisation? We already have the quote form customised so I could add it to that if I knew how.
Thanks for your help guys

Adrian.

Using @josecgomez 's method will require a block of custom code to be written in your BPM but is arguable the cleanest method to force a refresh. Let’s start there.
In your BPM, instead of invoking a BO method, we will use a custom code block. In that block, we will define our service that we want to go after and we will call the GetByID method

using(Erp.Contracts.QuoteSvcContract quoteSvc = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.QuoteSvcContract>(Db))
{
 QuoteTableset QuoteDs = quoteSvc.GetByID(<"YourQuoteNumVariable">);
 this.dsHolder.Attach(QuoteDs);
}
3 Likes

Hi Aaaron, thanks for the code. I tried to implement it but got this error message

image

So I tried this but I still get the error. What am I doing wrong?

image

Regards

Adrian

Can you tell me where you’re getting setting your number01 variable at? I bet we need to verify it’s being set correctly

1 Like

Hi Aaron,

I’m setting number01 in the pre prossesing directive, like this

Regards

Adrian.

Can you verify the location of the bpm exception? Is it happening on the pre processing or post? If you expand the error message it will tell us more

Here is the error detail

Regards

Adrian.

Oh boy. Can you do another test and hard code in your quote num value into your post processing code? I could be wrong but it almost looks like the issue is that the quote form you’re in is missing a dataset. Can you also try getting all the way out of the quote form and back in and then running the test (not the hard coded test)?

I did like you said and hard coded the quote number into the code and I did not get the error but I had to manually refresh for the BPM to work.
I then put the variable back, came out of Epicor, went back in and got the error again!

Regards

Adrian.

Can you try setting the BPM data field before your conditional block?

Still got the same error Aaron

Sorry Adrian, I’m not sure why that’s happening. It’s clear that the temp table value is empty, and we need to get QuoteNum from somewhere. I have a BPM that is very similar to yours and I set my variable exactly like do you without issue. @josecgomez any ideas?

Are you making an actual change to the quotehed? The BO only passes back the ttTable that has the change (some times).
Can you put a screenshot of each of your nodes in the Pre-Proc and post proc
Also what are you doing to trigger it

Hi guys,

Here is a bit of info on what I am trying to do. If a sales rep has a sample account or a customer orders a sample, there is no charge for the item . So, I have used the QuoteDtl.AnalysisCode field to identify this. With a user code entry of ‘SMP’

image

The condition on the pre processing is like this,

This is because it can either be a sample account or it can be selected as a sample on an ordinary account.

The condition on the post processing is as follows

In the case of a sample the price should be set to zero this was working but not without a manual screen refresh.
Hopefully what I’m trying to do is a bit clearer now.

Best regards
Adrian.

Change your code to look for the quotenumber from the ttQuoteDtl taBle and not ttQuoteHed

2 Likes