BPM Pre-Processing parameter value is Zero

Hello everyone,
I’m working on BPM (Method Directive | Pre-processing) . Business Object used - Quote and Method used - createOrder. Whenever a new sales order is created I’m getting the SONumError SONumError2 mail with required data except the new sales order number. The number always shows 0. I have attached screenshot for reference.

When a new order is first created - and before it is saved - it is assigned OrderNumber 0.

You can see this in order entry when you select New Order.

Edit

Even after entering data into “order 0”, it stays as 0 until it is saved. And there’s no data in the DB for order 0. This is why two people can simulatneously be working on “order 0”. Think of it as an indicator of “not yet created”.

NewOrderZero

3 Likes

But Im working on Opp/Quote form.

Youre using the pre-process BPM which has the data before it is committed- which is when the order number will be assigned.

Make a post-proc bpm that just displays the order num. It should display there. Because post-procs fire after the data is committed.

Initially i tried with post-proc, Im getting sales number as well but rest of the fields comes blank. For example -

New sales order 5646 has been created

QuoteNum:
SoNum:
Cust Name:

any solution for this?

For quotenum, are you using the field from the quote table, or the orderhed table?

Its after midnight here, so ill check back in tomorrow

All the fields I’m using from quote table.

Okay thanks @ckrusen :slight_smile:

have you checked the Quote BO dataset i.e. ip parameters?

You’ll not get data in temp table of quote in post processing. To get the quote data, you’ll need to use Db.QuoteHed by join of OrderDtl.QuoteNum.

@Zoher_Ali So do i need a custom code for this or it can be achieved by query designer?

@Zoher_Ali In pre-processing im getting all the Quote data. But not getting newly created sales order number. Can u provide solution for how to get SO parameter value?

Is you goal to just send that email? Or does it need to do other things?

If just the email, what dynamic info do you want it to include (OrderNum, QuoteNum, …??)

Could you not use the BPMContext variables to store the preprocess info, and use them in the postprocess ?

Pierre

2 Likes

Like @Hogardy said, use BPMContext vars

  1. Capture the QuoteNum in the pre-proc
    image
    image
    image

  2. Create the email in the Post-Proc.

  • param orderNum will have the Order number
  • BPMContext.Number01 will hold the quote number

(Here they are in an example message box)
image

Hint: Build the date as a string in the Pre-Proc, and assign it to BPMContext.Character01. Then use that in the post proc to show a prettier date (no time part)

1 Like

Thank you so much @ckrusen and @Hogardy. Getting the result as expected. :slight_smile: