# BPM Pre-Processing parameter value is Zero

**URL:** <https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240>\
**Category:** Epicor ERP 10\
**Tags:** bpm-directive, bpm-email\
**Created:** [February 5, 2020, 1:32pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240 "2020-02-05T13:32:47Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akashdeep\_Singh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Akashdeep\_Singh](https://www.epiusers.help/u/Akashdeep_Singh)\
**Post date:** [February 5, 2020, 1:32pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/1 "2020-02-05T13:32:47Z")

</div>

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](https://epiusers.help/uploads/default/original/3X/0/f/0fe6be8e646f02b3dd8fe13d90abb08b5388f943.png) ![SONumError2](https://epiusers.help/uploads/default/original/3X/f/a/fa38c030ceaa0373059c4e6d08ad066cb4373c83.png) mail with required data except the new sales order number. The number always shows 0. I have attached screenshot for reference.

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [February 5, 2020, 1:51pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/2 "2020-02-05T13:51:22Z")

</div>

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](https://epiusers.help/uploads/default/original/3X/2/b/2b98f422bddec84d28542ad67c23c9e33ad3cf39.gif)

---

<div class="post-metadata">

**Author:** ![Akashdeep\_Singh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Akashdeep\_Singh](https://www.epiusers.help/u/Akashdeep_Singh)\
**Post date:** [February 6, 2020, 5:03am UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/3 "2020-02-06T05:03:51Z")

</div>

But Im working on Opp/Quote form.

 ![SONumError3](https://epiusers.help/uploads/default/original/3X/2/d/2d0cf221201f38c4b52e8c33b000956222734d2a.png)

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [February 6, 2020, 5:25am UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/4 "2020-02-06T05:25:26Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Akashdeep\_Singh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Akashdeep\_Singh](https://www.epiusers.help/u/Akashdeep_Singh)\
**Post date:** [February 6, 2020, 5:29am UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/5 "2020-02-06T05:29:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [February 6, 2020, 5:33am UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/6 "2020-02-06T05:33:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Akashdeep\_Singh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Akashdeep\_Singh](https://www.epiusers.help/u/Akashdeep_Singh)\
**Post date:** [February 6, 2020, 5:35am UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/7 "2020-02-06T05:35:41Z")

</div>

All the fields I’m using from quote table.

Okay thanks @ckrusen🙂

---

<div class="post-metadata">

**Author:** ![A.Baeisa](https://www.epiusers.help/user_avatar/www.epiusers.help/a.baeisa/32/8988_2.png) [@A.Baeisa](https://www.epiusers.help/u/A.Baeisa)\
**Post date:** [February 6, 2020, 11:37am UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/8 "2020-02-06T11:37:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Zoher\_Ali](https://www.epiusers.help/user_avatar/www.epiusers.help/zoher_ali/32/11615_2.png) [@Zoher\_Ali](https://www.epiusers.help/u/Zoher_Ali)\
**Post date:** [February 6, 2020, 12:06pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/9 "2020-02-06T12:06:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Akashdeep\_Singh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Akashdeep\_Singh](https://www.epiusers.help/u/Akashdeep_Singh)\
**Post date:** [February 6, 2020, 12:42pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/10 "2020-02-06T12:42:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Akashdeep\_Singh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Akashdeep\_Singh](https://www.epiusers.help/u/Akashdeep_Singh)\
**Post date:** [February 6, 2020, 1:19pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/11 "2020-02-06T13:19:49Z")

</div>

@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?

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [February 6, 2020, 2:12pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/12 "2020-02-06T14:12:49Z")

</div>

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, …??)

---

<div class="post-metadata">

**Author:** ![Hogardy](https://www.epiusers.help/user_avatar/www.epiusers.help/hogardy/32/18785_2.png) [@Hogardy](https://www.epiusers.help/u/Hogardy)\
**Post date:** [February 6, 2020, 2:21pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/13 "2020-02-06T14:21:45Z")

</div>

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

Pierre

---

<div class="post-metadata">

**Author:** ![ckrusen](https://www.epiusers.help/user_avatar/www.epiusers.help/ckrusen/32/50584_2.png) [@ckrusen](https://www.epiusers.help/u/ckrusen)\
**Post date:** [February 6, 2020, 2:49pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/14 "2020-02-06T14:49:37Z")

</div>

Like @Hogardy said, use BPMContext vars

1. Capture the QuoteNum in the pre-proc  
 ![image](https://epiusers.help/uploads/default/original/3X/b/4/b465c492a8874475bf67656e4d816a78b660492a.png)  
 ![image](https://epiusers.help/uploads/default/original/3X/2/a/2a56566f858bad07ab29fc9099dc4ec4978a824e.png)  
 ![image](https://epiusers.help/uploads/default/original/3X/f/d/fd4ac81cc05483a5e712322a1d8ddacca429a2af.png)

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](https://epiusers.help/uploads/default/original/3X/d/d/dd5b09cc939bd36a77abe215b337324bcd8d614a.png)

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)

---

<div class="post-metadata">

**Author:** ![Akashdeep\_Singh](https://www.epiusers.help/letter_avatar_proxy/v4/letter/a/f08c70/32.png) [@Akashdeep\_Singh](https://www.epiusers.help/u/Akashdeep_Singh)\
**Post date:** [February 6, 2020, 9:49pm UTC](https://www.epiusers.help/t/bpm-pre-processing-parameter-value-is-zero/64240/15 "2020-02-06T21:49:26Z")

</div>

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