Method Directive Help

You probably should use the condition of Results on the BAQ are greater than or Equal to, then write the BAQ to Find if the Part exists. Set the filters on your BAQ to find another XRef Part with the same part number. I hope that makes sense.


Jose C Gomez
Software Engineer


T: 904.469.1524 mobile

Quis custodiet ipsos custodes?

On Wed, Apr 15, 2015 at 12:45 PM, scooley@... [vantage] <vantage@yahoogroups.com> wrote:

Â
<div>
  
  
  <p></p><p>Calling PartXRefMfg.Update (Pre-Processing)</p><p>I want to restrict entering a Mfg. part number that already exists, regardless of the Manufacturer or Main Part number entered.  I have the action set with a raised exception, no problem, but i&#39;m having problems with the Condition.</p><p><br></p><p>If I use &quot;the PartXRefMfg.MfgPartNum field of the changed row is equal to the ttPartXRefMfg.MfgPartNum expression&quot; Then It calls my raised exception in every case.</p><p><br></p><p>I tried to use &quot;[the specified] [public] data tag [exists] on [the changed row] of the [specified] table&quot; but when I try to define the first [the specified] it returns an unhandled exception, maybe a bug?</p><p><br></p><p>Before I call Epicor on this one, am I headed in the right direction with this?</p><p> </p><p></p>

</div>
 


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

I have this code I am working on. The idea is to update or insert the total number (cume shipped) into orderdtl.number02. When the code looks at the temp table as pasted below, it does nothing, but if I use shipDtl instead of the temp table, it updates all orders. What I need to do is update only the order that is currently active. I have inserted this code as a pre-process to custship.getorderinfo. I have also tried it as a post-process. This is 8.03.408B. Does anyone have an idea? If I leave it updating every order, it takes 90 seconds to do the job which is not acceptable.

For Each OrderDtl.
DO:
Run lib\UpdateTableBuffer.p(input buffer orderdtl:HANDLE,'Number02',0).
END.
End.
{&CALL_DESIGNED_ACTIONS}

/*Add source code that should be executed after the designed actions here*/
Define Variable iTotal as Integer No-Undo.

iTotal = 0.

For Each OrderDtl no-lock,
Each ttShipDtl WHERE (orderdtl.company = ttshipdtl.company and orderdtl.OrderNum = ttshipdtl.OrderNum and orderdtl.OrderLine = ttshipdtl.OrderLine and ttshipdtl.ReadyToInvoice = TRUE)BY ttshipdtl.OrderNum.
Do:
iTotal = iTotal + ttShipDtl.SellingInventoryShipQty.
Run lib\UpdateTableBuffer.p(input buffer orderdtl:HANDLE,'Number02',orderdtl.number02 + iTotal).
END.
iTotal = 0.
End.

Thanks for any help you can give,

Tim Dines
Steel Parts Manufacturing
Hi Tim,

I think the only thing you have to change is the first loop where you are
updating every orderDTL.Number02 = 0.



But can I ask why you are doing this? In the OrderRel Epicor already tracks
this information in OrderRel.OurJobShippedQty and
OrderRel.OurStockShippedQty

--Sean





For Each OrderDtl.
DO:
Run lib\UpdateTableBuffer.p(input buffer orderdtl:HANDLE,'Number02',0).
END.
End.
{&CALL_DESIGNED_ACTIONS}

/*Add source code that should be executed after the designed actions here*/
Define Variable iTotal as Integer No-Undo.

iTotal = 0.

For Each OrderDtl no-lock,
Each ttShipDtl WHERE (orderdtl.company = ttshipdtl.company and
orderdtl.OrderNum = ttshipdtl.OrderNum and orderdtl.OrderLine =
ttshipdtl.OrderLine and ttshipdtl.ReadyToInvoice = TRUE)BY
ttshipdtl.OrderNum.
Do:
iTotal = iTotal + ttShipDtl.SellingInventoryShipQty.
Run lib\UpdateTableBuffer.p(input buffer
orderdtl:HANDLE,'Number02',orderdtl.number02 + iTotal).
END.
iTotal = 0.
End.







From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
timdines@...
Sent: Monday, March 08, 2010 1:33 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Method Directive Help





I have this code I am working on. The idea is to update or insert the total
number (cume shipped) into orderdtl.number02. When the code looks at the
temp table as pasted below, it does nothing, but if I use shipDtl instead of
the temp table, it updates all orders. What I need to do is update only the
order that is currently active. I have inserted this code as a pre-process
to custship.getorderinfo. I have also tried it as a post-process. This is
8.03.408B. Does anyone have an idea? If I leave it updating every order, it
takes 90 seconds to do the job which is not acceptable.

For Each OrderDtl.
DO:
Run lib\UpdateTableBuffer.p(input buffer orderdtl:HANDLE,'Number02',0).
END.
End.
{&CALL_DESIGNED_ACTIONS}

/*Add source code that should be executed after the designed actions here*/
Define Variable iTotal as Integer No-Undo.

iTotal = 0.

For Each OrderDtl no-lock,
Each ttShipDtl WHERE (orderdtl.company = ttshipdtl.company and
orderdtl.OrderNum = ttshipdtl.OrderNum and orderdtl.OrderLine =
ttshipdtl.OrderLine and ttshipdtl.ReadyToInvoice = TRUE)BY
ttshipdtl.OrderNum.
Do:
iTotal = iTotal + ttShipDtl.SellingInventoryShipQty.
Run lib\UpdateTableBuffer.p(input buffer
orderdtl:HANDLE,'Number02',orderdtl.number02 + iTotal).
END.
iTotal = 0.
End.

Thanks for any help you can give,

Tim Dines
Steel Parts Manufacturing





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

Calling PartXRefMfg.Update (Pre-Processing)

I want to restrict entering a Mfg. part number that already exists, regardless of the Manufacturer or Main Part number entered.  I have the action set with a raised exception, no problem, but i'm having problems with the Condition.


If I use "the PartXRefMfg.MfgPartNum field of the changed row is equal to the ttPartXRefMfg.MfgPartNum expression" Then It calls my raised exception in every case.


I tried to use "[the specified] [public] data tag [exists] on [the changed row] of the [specified] table" but when I try to define the first [the specified] it returns an unhandled exception, maybe a bug?


Before I call Epicor on this one, am I headed in the right direction with this?