#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187
filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:Consolas;panose-1:2 11 6 9 2 2 4 3 2 4;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:"Microsoft Sans Serif";panose-1:2 11 6 4 2 2 2 2 2 4;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {font-family:"Comic Sans MS";panose-1:3 15 7 2 3 3 2 2 2 4;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187
#ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187MsoNormal, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187MsoNormal, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187MsoNormal
{margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman", "serif";}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 a:link, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187MsoHyperlink
{
color:blue;text-decoration:underline;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 a:visited, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187MsoHyperlinkFollowed
{
color:purple;text-decoration:underline;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p
{
margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 code
{
font-family:“Courier New”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 pre
{
margin:0in;margin-bottom:.0001pt;font-size:10.0pt;font-family:“Courier New”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 tt
{
font-family:“Courier New”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187cat
{}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187ct
{}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187HTMLPreformattedChar
{
font-family:Consolas;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187attach, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187attach, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187attach
{
margin-right:0in;margin-left:0in;font-size:9.0pt;font-family:“Arial”, “sans-serif”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187bold, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187bold, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187bold
{
margin-right:0in;margin-left:0in;font-size:10.0pt;font-family:“Arial”, “sans-serif”;font-weight:bold;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187green, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187green, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187green
{
margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:“Times New Roman”, “serif”;color:#628C2A;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187replbq, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187replbq, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187replbq
{
margin:3.0pt;font-size:12.0pt;font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187ad, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187ad, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187ad
{
margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187underline, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187underline, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187underline
{
margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187yshortcuts
{}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187ad1, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187ad1, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187ad1
{
margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187ad2, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187ad2, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187ad2
{
margin-right:0in;margin-bottom:7.5pt;margin-left:0in;font-size:12.0pt;font-family:“Times New Roman”, “serif”;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 p.ygrps-yiv-331318111ygrps-yiv-27622187underline1, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 li.ygrps-yiv-331318111ygrps-yiv-27622187underline1, #ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187underline1
{
margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:“Times New Roman”, “serif”;text-decoration:underline;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187yshortcuts1
{
font-family:“Verdana”, “sans-serif”;font-weight:bold;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187yshortcuts2
{
font-family:“Verdana”, “sans-serif”;font-weight:normal;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 span.ygrps-yiv-331318111ygrps-yiv-27622187EmailStyle36
{
font-family:“Calibri”, “sans-serif”;color:#1F497D;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 .ygrps-yiv-331318111ygrps-yiv-27622187MsoChpDefault
{
font-size:10.0pt;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
margin:1.0in 1.0in 1.0in 1.0in;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 div.ygrps-yiv-331318111ygrps-yiv-27622187WordSection1
{}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187
filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Symbol;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:“Courier New”;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Wingdings;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Wingdings;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Wingdings;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Wingdings;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Wingdings;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Wingdings;}
#ygrps-yiv-331318111 filtered #ygrps-yiv-331318111ygrps-yiv-27622187 {
font-family:Wingdings;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 ol
{margin-bottom:0in;}
#ygrps-yiv-331318111 #ygrps-yiv-331318111ygrps-yiv-27622187 ul
{margin-bottom:0in;}
What BO are you putting this on? Do you really need code. Seems like you might be able to do this with a few conditions and then a set action. But if you
want to do it in code, I would suggest not going from the release to the detail to the release to the detail. Because there could be many OrderRel to an OrderDtl, I would check the condition on the OrderDtl first and then go onto the OrderRel. Also make
sure to RELEASE the table you lock.
Example:
FIND FIRST Resource
WHERE (Resource.Company =
CUR-COMP) AND
(Resource.ResourceID = ttCallContextBpmData.ShortChar01)
exclusive-lock.
IF
AVAILABLE Resource THEN DO:
Assign
Resource.Inactive = TRUE.
END.
RELEASE RESOURCE.
Hey Everyone,
I am working on getting a BPM going which will automatically assign the sales rep to an order release if the applicable product is on the order. I am using a OrderRel.Character01 to hold this information as this is separate from the salesperson assigned
to an order.
If any order line has a part number starting with "GDS" I want to assign the rep to all lines with part numbers starting with "GDS" or having a product group begin with "ECBL" or "PCBL". The following code seems to drill down to the correct level
but it fails to assign the value to character01 in all situations and in the case where the part number begins with "GDS", EPICOR fails to create the line when done from the create sales order wizard in quote entry.
I have this code placed in a Standard Data Directive on the OrderRel Table.
Any ideas on what I am doing wrong??
Find First OrderDtl where OrderDtl.OrderNum = ttOrderRel.OrderNum and OrderDtl.PartNum BEGINS "GDS" No-Lock No-Error.
If Avail OrderDtl or ttOrderRel.PartNum BEGINS "GDS" then DO:
For Each OrderRel where OrderRel.OrderNum = ttOrderRel.OrderNum Exclusive-Lock:
Find First OrderDtl where OrderDtl.OrderNum = OrderRel.OrderNum and OrderDtl.OrderLine = OrderRel.OrderLine No-Lock No-Error.
If Avail OrderDtl and (OrderRel.PartNum BEGINS "GDS" or OrderDtl.ProdCode = "PCBL" or OrderDtl.ProdCode = "ECBL") then DO:
Assign OrderRel.Character01 = "TST".