Post-Processing BPM on Quote.CreateOrder

On Orderhed you need an exclusive-Lock for the update to take hold.

Jim Kinneman
Encompass Solutions, Inc.
I am new to BPMs and am trying to pull a field from the QuoteHed table and assign it to the OrderHed table as a post-processing trigger on the Quote.CreateOrder method. This is what I have so far, but at the end I just don't know the correct syntax to get the quotehed.Character01 into the orderhed.shortchar04 field.  Any pointers would be greatly appreciated as I know this in incorrect as the orderhed.shotchar04 field is not populating.

for each ttquotedtl:
            find first orderdtl no-lock where OrderDtl.Company = CUR-COMP and OrderDtl.OrderNum = OrderNum and OrderDtl.QuoteNum = ttQuoteDtl.QuoteNum no-error.
 
if available orderdtl then do:
find first orderhed no-lock where orderhed.Company = orderdtl.company and orderhed.ordernum = orderdtl.ordernum no-error.
 
if available orderhed then do:
find first quotehed no-lock where quotehed.Company = orderhed.company and orderhed.ordernum = orderdtl.ordernum no-error.
 
if available quotehed then do:
assign orderhed.shortchar04 = quotehed.Character01.

end.
end.
end.
end.

I always start with an informational message to be sure the method is getting triggered. In the message you can use insert field to see the tables that are available.

You may have to enable the post processing directive from a pre processing if it doesn’t fire.

 

You don’t want no-lock on ordered if you  intend to update it.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, February 26, 2016 12:39 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Post-Processing BPM on Quote.CreateOrder

 

 

I am new to BPMs and am trying to pull a field from the QuoteHed table and assign it to the OrderHed table as a post-processing trigger on the Quote.CreateOrder method. This is what I have so far, but at the end I just don't know the correct syntax to get the quotehed.Character01 into the orderhed.shortchar04 field.  Any pointers would be greatly appreciated as I know this in incorrect as the orderhed.shotchar04 field is not populating.

for each ttquotedtl:

            find first orderdtl no-lock where OrderDtl.Company = CUR-COMP and OrderDtl.OrderNum = OrderNum and OrderDtl.QuoteNum = ttQuoteDtl.QuoteNum no-error.

 

if available orderdtl then do:< /span>

find first orderhed no-lock where orderhed.Company = orderdtl.company and orderhed.ordernum = orderdtl.ordernum no-error.

 

if available orderhed then do:

find first quotehed no-lock where quotehed.Company = orderhed.company and orderhed.ordernum = orderdtl.ordernum no-error.

 

if available quotehed then do:

assign orderhed.shortchar04 = quotehed.Character01.



end.

end.

end.

end.




CONFIDENTIALITY NOTICE

The information contained in this communication, including attachments, is privileged and confidential. It is intended only for the exclusive use of the addressee. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at 727-578-6240 and immediately delete the communication.

"This (document/presentation) may contain technical data as defined in the International Traffic In Arms Regulations (ITAR) 22 CFR 120.10. Export of this material is restricted by the Arms Export Control Act (22 U.S.C. 2751 et seq.) and may not be exported to foreign persons without prior approval form the U.S. Department of State."
I started with the info msg  and it is getting fired.  I'll try the no-lock and see if that's the issue.  Thanks for the pointers.


On Friday, February 26, 2016 1:05 PM, "Greg Payne gpayne@... [vantage]" <vantage@yahoogroups.com> wrote:


 
<div id="ygrps-yiv-116647488yiv1822031204ygrp-text">
  
  
  <div>
I always start with an informational message to be sure the method is getting triggered. In the message you can use insert field to see the tables that are available.
You may have to enable the post processing directive from a pre processing if it doesn’t fire.
 
You don’t want no-lock on ordered if you  intend to update it.
 
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Friday, February 26, 2016 12:39 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Post-Processing BPM on Quote.CreateOrder
 
 
I am new to BPMs and am trying to pull a field from the QuoteHed table and assign it to the OrderHed table as a post-processing trigger on the Quote.CreateOrder method. This is what I have so far, but at the end I just don't know the correct syntax to get the quotehed.Character01 into the orderhed.shortchar04 field.  Any pointers would be greatly appreciated as I know this in incorrect as the orderhed.shotchar04 field is not populating.
for each ttquotedtl:
            find first orderdtl no-lock where OrderDtl.Company = CUR-COMP and OrderDtl.OrderNum = OrderNum and OrderDtl.QuoteNum = ttQuoteDtl.QuoteNum no-error.
 
if available orderdtl then do:< /span>
find first orderhed no-lock where orderhed.Company = orderdtl.company and orderhed.ordernum = orderdtl.ordernum no-error.
 
if available orderhed then do:
find first quotehed no-lock where quotehed.Company = orderhed.company and orderhed.ordernum = orderdtl.ordernum no-error.
 
if available quotehed then do:
assign orderhed.shortchar04 = quotehed.Character01.


end.
end.
end.
end.



CONFIDENTIALITY NOTICE

The information contained in this communication, including attachments, is privileged and confidential. It is intended only for the exclusive use of the addressee. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at 727-578-6240 and immediately delete the communication.

"This (document/presentation) may contain technical data as defined in the International Traffic In Arms Regulations (ITAR) 22 CFR 120.10. Export of this material is restricted by the Arms Export Control Act (22 U.S.C. 2751 et seq.) and may not be exported to foreign persons without prior approval form the U.S. Department of State."
</div>
 


<div style="color:#fff;height:0;"></div></div>
#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204 -- #ygrps-yiv-116647488yiv1822031204ygrp-mkp { border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mkp hr {
border:1px solid #d8d8d8;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mkp #ygrps-yiv-116647488yiv1822031204hd {
color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mkp #ygrps-yiv-116647488yiv1822031204ads {
margin-bottom:10px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mkp .ygrps-yiv-116647488yiv1822031204ad {
padding:0 0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mkp .ygrps-yiv-116647488yiv1822031204ad p {
margin:0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mkp .ygrps-yiv-116647488yiv1822031204ad a {
color:#0000ff;text-decoration:none;}
#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-sponsor #ygrps-yiv-116647488yiv1822031204ygrp-lc {
font-family:Arial;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-sponsor #ygrps-yiv-116647488yiv1822031204ygrp-lc #ygrps-yiv-116647488yiv1822031204hd {
margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-sponsor #ygrps-yiv-116647488yiv1822031204ygrp-lc .ygrps-yiv-116647488yiv1822031204ad {
margin-bottom:10px;padding:0 0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204actions {
font-family:Verdana;font-size:11px;padding:10px 0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204activity {
background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204activity span {
font-weight:700;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204activity span:first-child {
text-transform:uppercase;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204activity span a {
color:#5085b6;text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204activity span span {
color:#ff7900;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204activity span .ygrps-yiv-116647488yiv1822031204underline {
text-decoration:underline;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204attach {
clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204attach div a {
text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204attach img {
border:none;padding-right:5px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204attach label {
display:block;margin-bottom:5px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204attach label a {
text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 blockquote {
margin:0 0 0 4px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204bold {
font-family:Arial;font-size:13px;font-weight:700;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204bold a {
text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 dd.ygrps-yiv-116647488yiv1822031204last p a {
font-family:Verdana;font-weight:700;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 dd.ygrps-yiv-116647488yiv1822031204last p span {
margin-right:10px;font-family:Verdana;font-weight:700;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 dd.ygrps-yiv-116647488yiv1822031204last p span.ygrps-yiv-116647488yiv1822031204yshortcuts {
margin-right:0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204attach-table div div a {
text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204attach-table {
width:400px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204file-title a, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204file-title a:active, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204file-title a:hover, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204file-title a:visited {
text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204photo-title a, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204photo-title a:active, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204photo-title a:hover, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div.ygrps-yiv-116647488yiv1822031204photo-title a:visited {
text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 div#ygrps-yiv-116647488yiv1822031204ygrp-mlmsg #ygrps-yiv-116647488yiv1822031204ygrp-msg p a span.ygrps-yiv-116647488yiv1822031204yshortcuts {
font-family:Verdana;font-size:10px;font-weight:normal;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204green {
color:#628c2a;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204MsoNormal {
margin:0 0 0 0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 o {
font-size:0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204photos div {
float:left;width:72px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204photos div div {
border:1px solid #666666;height:62px;overflow:hidden;width:62px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204photos div label {
color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204reco-category {
font-size:77%;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204reco-desc {
font-size:77%;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 .ygrps-yiv-116647488yiv1822031204replbq {
margin:4px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-actbar div a:first-child {
margin-right:2px;padding-right:5px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mlmsg {
font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mlmsg table {
font-size:inherit;font:100%;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mlmsg select, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 input, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 textarea {
font:99% Arial, Helvetica, clean, sans-serif;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mlmsg pre, #ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 code {
font:115% monospace;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mlmsg * {
line-height:1.22em;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-mlmsg #ygrps-yiv-116647488yiv1822031204logo {
padding-bottom:10px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-msg p a {
font-family:Verdana;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-msg p#ygrps-yiv-116647488yiv1822031204attach-count span {
color:#1E66AE;font-weight:700;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-reco #ygrps-yiv-116647488yiv1822031204reco-head {
color:#ff7900;font-weight:700;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-reco {
margin-bottom:20px;padding:0px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-sponsor #ygrps-yiv-116647488yiv1822031204ov li a {
font-size:130%;text-decoration:none;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-sponsor #ygrps-yiv-116647488yiv1822031204ov li {
font-size:77%;list-style-type:square;padding:6px 0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-sponsor #ygrps-yiv-116647488yiv1822031204ov ul {
margin:0;padding:0 0 0 8px;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-text {
font-family:Georgia;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-text p {
margin:0 0 1em 0;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-text tt {
font-size:120%;}

#ygrps-yiv-116647488 #ygrps-yiv-116647488yiv1822031204 #ygrps-yiv-116647488yiv1822031204ygrp-vital ul li:last-child {
border-right:none !important;}
#ygrps-yiv-116647488