E9: BPM - SalesOrder.CreateOrderFromQuote

Hi Joe,



We create orders both ways too. In SalesOrder.Update I have a Pre-Processing condition:

the ttOrderDtl.Number01 field has been changed from any to 0

or the ttOrderDtl.Number01 field of the changed row is equal to the 0 value

or the OrderDtl.RowMod field of the changed row is equal to the ‘A’ value



Then under Actions advanced:

/*Add source code that should be executed before the designed actions here*/



{&CALL_DESIGNED_ACTIONS}



/*Add source code that should be executed after the designed actions here*/

for each QuoteDtl

where (QuoteDtl.Company = ttOrderDtl.Company

and QuoteDtl.QuoteNum = ttOrderDtl.QuoteNum

and QuoteDtl.QuoteLine = ttOrderDtl.QuoteLine) no-lock.

if available QuoteDtl then do:

if QuoteDtl.Number01 = 0 then do:

assign ttOrderDtl.Number01 = QuoteDtl.QuoteLine.

end.

if QuoteDtl.Number01 <> 0 then do:

assign ttOrderDtl.Number01 = QuoteDtl.Number01.

end.

end.

if not available QuoteDtl then do:

assign ttOrderDtl.Number01 = ttOrderDtl.OrderLine.

end.

end.





From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Joe Rojas
Sent: Monday, July 19, 2010 9:00 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] E9: BPM - SalesOrder.CreateOrderFromQuote





Thanks Linda.

I will need to add a BPM when creating a Sales Order from a Quote and I will use your example below.

I also need to add a BPM when creating a Sales Order, that based off a Quote, from Order Entry just to make sure I cover my bases so I’ll keep digging.

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of Linda Lowney
Sent: Monday, July 19, 2010 8:51 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] E9: BPM - SalesOrder.CreateOrderFromQuote

Hi Joe,

We copy CheckBox05 and Number01 from the quote to the order during Quote.CreateOrder. I added a Post-Processing directive with no conditions. In actions I used the Advanced button to add this code.

The order number is stored as a variable. After pressing the Advanced button you will see some Parameter variables at the top of the screen – the orderNum variable is there.

Linda

/*Add source code that should be executed before the designed actions here*/

{&CALL_DESIGNED_ACTIONS}

/*Add source code that should be executed after the designed actions here*/

for each OrderHed where OrderHed.OrderNum = orderNum,

each OrderDtl where OrderDtl.OrderNum = orderNum,

each QuoteDtl

where (QuoteDtl.Company = OrderDtl.Company and

QuoteDtl.QuoteNum = OrderDtl.QuoteNum and

QuoteDtl.QuoteLine = OrderDtl.QuoteLine)no-lock,

each QuoteHed where (QuoteHed.Company = QuoteDtl.Company and

QuoteHed.QuoteNum = QuoteDtl.QuoteNum) no-lock.

if available OrderHed then do:

Run lib\UpdateTableBuffer.p(input BUFFER OrderHed:HANDLE,'CheckBox05', QuoteHed.CheckBox05).

end.

if available OrderDtl then do:

Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,'Number01', QuoteDtl.Number01).

end.

End.

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com> ] On Behalf Of Joe Rojas
Sent: Friday, July 16, 2010 5:03 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] E9: BPM - SalesOrder.CreateOrderFromQuote

Hello,

I am storing information on the Quote Line screen in a UD field that I
need to have copied over to the same UD field of a sales order line when
Sales Order is created off of a quote.

I did a trace and the CreateOrderFromQuote seemed to be the logical
place to create the BPM.

The issue I'm having is trying to figure out how Epicor "knows" what the
new Sales Order number is that gets created. It doesn't seem to be
passed back from this method.

Any ideas?

Thanks!

Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-1264 | fax: 781-341-5694
jrojas@... <mailto:jrojas%40matsinc.com> <mailto:jrojas%40matsinc.com> <mailto:jrojas%40matsinc.com> | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring

This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Hello,



I am storing information on the Quote Line screen in a UD field that I
need to have copied over to the same UD field of a sales order line when
Sales Order is created off of a quote.

I did a trace and the CreateOrderFromQuote seemed to be the logical
place to create the BPM.

The issue I'm having is trying to figure out how Epicor "knows" what the
new Sales Order number is that gets created. It doesn't seem to be
passed back from this method.



Any ideas?



Thanks!










Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-1264 | fax: 781-341-5694
jrojas@... | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring


This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.


[Non-text portions of this message have been removed]
Joe -
Our procedures require the order to be retrieved in Sales Order Entry, so I used a checkbox UD Field on the OrderHed, so the first time the GetByID is called, if the order is from a quote, my BPM moves information as needed from the QuoteDtl to the OrderDtl. Then I set the Checkbox to true so future GetByID don't process the code again.

Also, beware, some fields values are not properly set in the OrderDtl and OrderRel when the order is created from a Quote. Fields such as OrderDtl.BreakListCode, OrderDtl.TitalReleases, OrderRel.Make are not set to the same values as they are when the order is created in Sales Order Entry - until the SCR is released, I am fixing these fields with the same BPM

Dan Sirow
Independent Components Corp.

--- In vantage@yahoogroups.com, Joe Rojas <jrojas@...> wrote:
>
> Hello,
>
>
>
> I am storing information on the Quote Line screen in a UD field that I
> need to have copied over to the same UD field of a sales order line when
> Sales Order is created off of a quote.
>
> I did a trace and the CreateOrderFromQuote seemed to be the logical
> place to create the BPM.
>
> The issue I'm having is trying to figure out how Epicor "knows" what the
> new Sales Order number is that gets created. It doesn't seem to be
> passed back from this method.
>
>
>
> Any ideas?
>
>
>
> Thanks!
>
>
>
>
>
>
>
>
>
>
> Joe Rojas | Director of Information Technology | Mats Inc
> dir: 781-573-0291 | cell: 781-408-1264 | fax: 781-341-5694
> jrojas@... | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring
>
>
> This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.
>
>
> [Non-text portions of this message have been removed]
>
Hi Joe,



We copy CheckBox05 and Number01 from the quote to the order during Quote.CreateOrder. I added a Post-Processing directive with no conditions. In actions I used the Advanced button to add this code.



The order number is stored as a variable. After pressing the Advanced button you will see some Parameter variables at the top of the screen – the orderNum variable is there.



Linda







/*Add source code that should be executed before the designed actions here*/



{&CALL_DESIGNED_ACTIONS}



/*Add source code that should be executed after the designed actions here*/



for each OrderHed where OrderHed.OrderNum = orderNum,

each OrderDtl where OrderDtl.OrderNum = orderNum,

each QuoteDtl

where (QuoteDtl.Company = OrderDtl.Company and

QuoteDtl.QuoteNum = OrderDtl.QuoteNum and

QuoteDtl.QuoteLine = OrderDtl.QuoteLine)no-lock,

each QuoteHed where (QuoteHed.Company = QuoteDtl.Company and

QuoteHed.QuoteNum = QuoteDtl.QuoteNum) no-lock.

if available OrderHed then do:

Run lib\UpdateTableBuffer.p(input BUFFER OrderHed:HANDLE,'CheckBox05', QuoteHed.CheckBox05).

end.

if available OrderDtl then do:

Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,'Number01', QuoteDtl.Number01).

end.

End.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Joe Rojas
Sent: Friday, July 16, 2010 5:03 PM
To: vantage@yahoogroups.com
Subject: [Vantage] E9: BPM - SalesOrder.CreateOrderFromQuote





Hello,

I am storing information on the Quote Line screen in a UD field that I
need to have copied over to the same UD field of a sales order line when
Sales Order is created off of a quote.

I did a trace and the CreateOrderFromQuote seemed to be the logical
place to create the BPM.

The issue I'm having is trying to figure out how Epicor "knows" what the
new Sales Order number is that gets created. It doesn't seem to be
passed back from this method.

Any ideas?

Thanks!







Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-1264 | fax: 781-341-5694
jrojas@... <mailto:jrojas%40matsinc.com> | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring

This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Thanks Linda.



I will need to add a BPM when creating a Sales Order from a Quote and I will use your example below.

I also need to add a BPM when creating a Sales Order, that based off a Quote, from Order Entry just to make sure I cover my bases so I’ll keep digging.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Linda Lowney
Sent: Monday, July 19, 2010 8:51 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] E9: BPM - SalesOrder.CreateOrderFromQuote





Hi Joe,



We copy CheckBox05 and Number01 from the quote to the order during Quote.CreateOrder. I added a Post-Processing directive with no conditions. In actions I used the Advanced button to add this code.



The order number is stored as a variable. After pressing the Advanced button you will see some Parameter variables at the top of the screen – the orderNum variable is there.



Linda







/*Add source code that should be executed before the designed actions here*/



{&CALL_DESIGNED_ACTIONS}



/*Add source code that should be executed after the designed actions here*/



for each OrderHed where OrderHed.OrderNum = orderNum,

each OrderDtl where OrderDtl.OrderNum = orderNum,

each QuoteDtl

where (QuoteDtl.Company = OrderDtl.Company and

QuoteDtl.QuoteNum = OrderDtl.QuoteNum and

QuoteDtl.QuoteLine = OrderDtl.QuoteLine)no-lock,

each QuoteHed where (QuoteHed.Company = QuoteDtl.Company and

QuoteHed.QuoteNum = QuoteDtl.QuoteNum) no-lock.

if available OrderHed then do:

Run lib\UpdateTableBuffer.p(input BUFFER OrderHed:HANDLE,'CheckBox05', QuoteHed.CheckBox05).

end.

if available OrderDtl then do:

Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE,'Number01', QuoteDtl.Number01).

end.

End.



From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On Behalf Of Joe Rojas
Sent: Friday, July 16, 2010 5:03 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] E9: BPM - SalesOrder.CreateOrderFromQuote





Hello,

I am storing information on the Quote Line screen in a UD field that I
need to have copied over to the same UD field of a sales order line when
Sales Order is created off of a quote.

I did a trace and the CreateOrderFromQuote seemed to be the logical
place to create the BPM.

The issue I'm having is trying to figure out how Epicor "knows" what the
new Sales Order number is that gets created. It doesn't seem to be
passed back from this method.

Any ideas?

Thanks!







Joe Rojas | Director of Information Technology | Mats Inc
dir: 781-573-0291 | cell: 781-408-1264 | fax: 781-341-5694
jrojas@... <mailto:jrojas%40matsinc.com> <mailto:jrojas%40matsinc.com> | www.matsinc.com Ask us about our clean, green and beautiful matting and flooring

This message is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company.

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]