BPM to update OrderRel on JobHead change

If you have EpicWeb, they have answerbooks.  Look up BPM under EPICOR905

 

Miguel A. Santillan

Compass Manufacturing Systems

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, January 22, 2015 1:09 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BPM to update OrderRel on JobHead change

 

 

This did it! Thank you so much for your help!

 

Do you have any good links/resources for ABL syntax? Thanks so much

Hi all
Looking for some guidance on how to set up a BPM. When a job is released I need to update a UD field on all order releases attached to the job. I am unsure how to make the update to the order release table through the BPM. Any guidance would be appreciated. Thank you

You will need to get from the Job to the Order Rels through JobProd I’m assuming you are on 9 when I say that

 

Joshua Giese

CIO

 

Direct:     920.593.8299

IT Dept:   920.437.6400 Ext. 337

Site ID:    27450-E905702A-SQL64

Wisconsin Converting, Inc.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, January 22, 2015 11:14 AM
To: vantage@yahoogroups.com
Subject: [Vantage] BPM to update OrderRel on JobHead change

 

 

Hi all

Looking for some guidance on how to set up a BPM. When a job is released I need to update a UD field on all order releases attached to the job. I am unsure how to make the update to the order release table through the BPM. Any guidance would be appreciated. Thank you

Yes version 9. Sorry I should have been more clear. I understand the table relationship with JobProd. I am good with setting up the condition in the BPM to check for a change in the field on JobHead. I am having trouble understanding the actions part of the BPM - how to make the update to OrderRelease. Which action type would be recommended for this?
Yes I am on 9. Sorry should have been more clear. I understand the table relationshipwith JobProd and how to set up the BPM condition to check for the field change on JobHead. It's the generation of query/code under the actions portion that I am having trouble with. Which action type would be recommended to update the OrderRel table? Thanks for your help.



I am trying to synchronusly execute the following ABL code from the JobEntry.Update method when ttJobHead.CheckOff05 changes from False to True.

FOR EACH OrderRel WHERE OrderRel.OrderNum = ttJobProd.OrderNum and OrderRel.OrderLine = ttJobProd.OrderLine and OrderRel.OrderRelNum = ttJobProd.OrderRelNum and ttJobProd.JobNum = ttJobHead.JobNum NO-LOCK: 
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'CheckBox01', TRUE). 
END.

It is not working.

You don't have a ttJobProd record you need to nest your loops
Also no lock on OrderRel won't let you update it.
FOR EACH ttJobProd:
FOR EACH... etc.Â

END.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Jan 22, 2015 at 1:17 PM, chad.m.terry@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>I am trying to synchronusly execute the following ABL code from the JobEntry.Update method when ttJobHead.CheckOff05 changes from False to True.</p><div><br></div><div><div>FOR EACH OrderRel WHERE OrderRel.OrderNum = ttJobProd.OrderNum and OrderRel.OrderLine = ttJobProd.OrderLine and OrderRel.OrderRelNum = ttJobProd.OrderRelNum and ttJobProd.JobNum = ttJobHead.JobNum NO-LOCK: </div><div>Run lib&#92;UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, &#39;CheckBox01&#39;, TRUE). </div><div>END.</div><div><br></div><div>It is not working.</div></div><div><br></div><p></p>

</div><span class="ygrps-yiv-2089878468">
 


<div style="color:#fff;min-height:0;"></div>


OK thanks for the advice. Changed to this and still not working as expected. Any other tips? Thanks!

FOR EACH ttJobProd WHERE ttJobProd.JobNum = ttJobHead.JobNum:
FOR EACH OrderRel WHERE OrderRel.OrderNum = ttJobProd.OrderNum and OrderRel.OrderLine = ttJobProd.OrderLine and OrderRel.OrderRelNum = ttJobProd.OrderRelNum: 
Run lib\UpdateTableBuffer.p(input BUFFER OrderRel:HANDLE, 'CheckBox01', TRUE).
END. 
END.

What you want is to set up orderrel.checkbox01 = True when jobhead change?



*Amélie Pelletier*

*Analyste Programmeur / Program analyst*



[image: cid:image001.jpg@01CD5525.2091A820]



*230, Boulevard Nilus-Leclerc*

*L'Islet, Québec (Canada)*

*G0R 2C0*

*Téléphone: 418-247-3986 ext. 2402*

*Fax: 418-247-7925*

*amelie.pelletier@... <brigitte.savoie@...>*

*P* Est-ce nécessaire d’imprimer ce message?
*Please consider the environment before printing this email**.*





*De :* vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
*Envoyé :* 22 janvier 2015 13:55
*À :* vantage@yahoogroups.com
*Objet :* [Vantage] Re: BPM to update OrderRel on JobHead change





OK thanks for the advice. Changed to this and still not working as
expected. Any other tips? Thanks!



FOR EACH ttJobProd WHERE ttJobProd.JobNum = ttJobHead.JobNum:

FOR EACH OrderRel WHERE OrderRel.OrderNum = ttJobProd.OrderNum
and OrderRel.OrderLine = ttJobProd.OrderLine and OrderRel.OrderRelNum =
ttJobProd.OrderRelNum:

Run lib\UpdateTableBuffer.p(input BUFFER
OrderRel:HANDLE, 'CheckBox01', TRUE).

END.

END.






[Non-text portions of this message have been removed]
Your code the for each ttJObHead you can't say where ttJobHead.JobNum= ttJobHead.JobNum.... you don't have a ttJObhead to compare against.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Jan 22, 2015 at 1:57 PM, Amélie Pelletier amelie.pelletier@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>What you want is to set up orderrel.checkbox01 = True when jobhead change?<br>

*Amélie Pelletier*

*Analyste Programmeur / Program analyst*

[image: cid:image001.jpg@01CD5525.2091A820]

*230, Boulevard Nilus-Leclerc*

*L'Islet, Québec (Canada)*

*G0R 2C0*

*Téléphone: 418-247-3986 ext. 2402*

*Fax: 418-247-7925*

*amelie.pelletier@... <brigitte.savoie@...>*

*P* Est-ce nécessaire d’imprimer ce message?
*Please consider the environment before printing this email**.*

*De :* vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
*Envoyé :* 22 janvier 2015 13:55
*À :* vantage@yahoogroups.com
*Objet :* [Vantage] Re: BPM to update OrderRel on JobHead change

OK thanks for the advice. Changed to this and still not working as
expected. Any other tips? Thanks!

FOR EACH ttJobProd WHERE ttJobProd.JobNum = ttJobHead.JobNum:

FOR EACH OrderRel WHERE OrderRel.OrderNum = ttJobProd.OrderNum
and OrderRel.OrderLine = ttJobProd.OrderLine and OrderRel.OrderRelNum =
ttJobProd.OrderRelNum:

Run lib\UpdateTableBuffer.p(input BUFFER
OrderRel:HANDLE, 'CheckBox01', TRUE).

END.

END.

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

</div>
 


<div style="color:#fff;min-height:0;"></div>

Yes, for every OrderRel row associated with that Job.
For every job?



*Amélie Pelletier*

*Analyste Programmeur / Program analyst*



[image: cid:image001.jpg@01CD5525.2091A820]



*230, Boulevard Nilus-Leclerc*

*L'Islet, Québec (Canada)*

*G0R 2C0*

*Téléphone: 418-247-3986 ext. 2402*

*Fax: 418-247-7925*

*amelie.pelletier@... <brigitte.savoie@...>*

*P* Est-ce nécessaire d’imprimer ce message?
*Please consider the environment before printing this email**.*





*De :* vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
*Envoyé :* 22 janvier 2015 14:06
*À :* vantage@yahoogroups.com
*Objet :* RE: [Vantage] Re: BPM to update OrderRel on JobHead change





Yes, for every OrderRel row associated with that Job.




[Non-text portions of this message have been removed]
ok in progress just because you have the table ttXX doens't mean you have a record selected to work with try this

FOR EACH ttJobHed WHERE ttJobHed.RowMod <>'':
//THER FOR EACH
END.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Thu, Jan 22, 2015 at 2:07 PM, chad.m.terry@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p>OK. I guess I&#39;m not sure why I wouldn&#39;t have a ttJobProd when I&#39;m in the update method of JobEntry? Can you suggest the correct code please? I appreciate your help.</p>

</div>
 


<div style="color:#fff;min-height:0;"></div>

But there is certainely is a condition in which you want a change of
orderrel.checkbox01?



*Amélie Pelletier*

*Analyste Programmeur / Program analyst*



[image: cid:image001.jpg@01CD5525.2091A820]



*230, Boulevard Nilus-Leclerc*

*L'Islet, Québec (Canada)*

*G0R 2C0*

*Téléphone: 418-247-3986 ext. 2402*

*Fax: 418-247-7925*

*amelie.pelletier@... <brigitte.savoie@...>*

*P* Est-ce nécessaire d’imprimer ce message?
*Please consider the environment before printing this email**.*





*De :* vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
*Envoyé :* 22 janvier 2015 14:07
*À :* vantage@yahoogroups.com
*Objet :* Re: [Vantage] Re: BPM to update OrderRel on JobHead change





OK. I guess I'm not sure why I wouldn't have a ttJobProd when I'm in the
update method of JobEntry? Can you suggest the correct code please? I
appreciate your help.




[Non-text portions of this message have been removed]
Only the job that is being updated from Job Entry screen.
Yes - when JobHead.CheckOff5 changes from False to True, I want the system to set OrderRel.CheckBox01 = True for every order release attached to that Job in the JobProd table.

Makes sense. So grab ttJobHead, link JobProd to it then link OrderRel to that and instead of BufferUpdate use Assign

 

FOR EACH ttJobHead, JobProd, OrderRel:

                Assign OrderRel.CheckBox01 = TRUE.

END.

 

Obviously abbreviated but you get the point.

 

Joshua Giese

CIO

 

Direct:     920.593.8299

IT Dept:   920.437.6400 Ext. 337

Site ID:    27450-E905702A-SQL64

Wisconsin Converting, Inc.

 

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
Sent: Thursday, January 22, 2015 1:12 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Re: BPM to update OrderRel on JobHead change

 

 

Yes - when JobHead.CheckOff5 changes from False to True, I want the system to set OrderRel.CheckBox01 = True for every order release attached to that Job in the JobProd table.

Exactly that!



*Amélie Pelletier*

*Analyste Programmeur / Program analyst*



[image: cid:image001.jpg@01CD5525.2091A820]



*230, Boulevard Nilus-Leclerc*

*L'Islet, Québec (Canada)*

*G0R 2C0*

*Téléphone: 418-247-3986 ext. 2402*

*Fax: 418-247-7925*

*amelie.pelletier@... <brigitte.savoie@...>*

*P* Est-ce nécessaire d’imprimer ce message?
*Please consider the environment before printing this email**.*





*De :* vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
*Envoyé :* 22 janvier 2015 14:19
*À :* vantage@yahoogroups.com
*Objet :* RE: [Vantage] Re: BPM to update OrderRel on JobHead change





Makes sense. So grab ttJobHead, link JobProd to it then link OrderRel to
that and instead of BufferUpdate use Assign



FOR EACH ttJobHead, JobProd, OrderRel:

Assign OrderRel.CheckBox01 = TRUE.

END.



Obviously abbreviated but you get the point.



*Joshua Giese*

CIO



Direct: 920.593.8299

IT Dept: 920.437.6400 Ext. 337

Site ID: 27450-E905702A-SQL64

Wisconsin Converting, Inc.



*From:* vantage@yahoogroups.com [mailto:vantage@yahoogroups.com
<vantage@yahoogroups.com>]
*Sent:* Thursday, January 22, 2015 1:12 PM
*To:* vantage@yahoogroups.com
*Subject:* RE: [Vantage] Re: BPM to update OrderRel on JobHead change





Yes - when JobHead.CheckOff5 changes from False to True, I want the system
to set OrderRel.CheckBox01 = True for every order release attached to that
Job in the JobProd table.




[Non-text portions of this message have been removed]
OK great. Sorry for the basic questions but I have trouble with ABL syntax. Not sure how to syntax what you are saying here: So grab ttJobHead, link JobProd to it then link OrderRel to that. How exactly do I "grab" ttJobHead and do the links? Thanks so much.



For each ttJohHead where ttJobHead.RowMod = ‘U’, each jobprod where
ttjobhead.jobnum = jobprod.jobnum and ttjobhead.company and
jobprod.company, each orderrel where jobprod.ordernum = orderrel.ordernum
and jobprod.orderline = orderrel.orderline, jobprod.orderrelnum =
orderrel.orderrelnum



Assign orderrel.checkbox01 = true.



*Amélie Pelletier*

*Analyste Programmeur / Program analyst*



[image: cid:image001.jpg@01CD5525.2091A820]



*230, Boulevard Nilus-Leclerc*

*L'Islet, Québec (Canada)*

*G0R 2C0*

*Téléphone: 418-247-3986 ext. 2402*

*Fax: 418-247-7925*

*amelie.pelletier@... <brigitte.savoie@...>*

*P* Est-ce nécessaire d’imprimer ce message?
*Please consider the environment before printing this email**.*





*De :* vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]
*Envoyé :* 22 janvier 2015 14:41
*À :* vantage@yahoogroups.com
*Objet :* RE: [Vantage] Re: BPM to update OrderRel on JobHead change





OK great. Sorry for the basic questions but I have trouble with ABL syntax.
Not sure how to syntax what you are saying here: So grab ttJobHead, link
JobProd to it then link OrderRel to that. How exactly do I "grab" ttJobHead
and do the links? Thanks so much.










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