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 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”.
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
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 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
Like @Hogardy said, use BPMContext vars
-
Capture the QuoteNum in the pre-proc
-
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)
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)