BPM Part Update method and PartPlant updates?

I replied to your first post but your code sample reinfoces what I had said there; you are not doing anything with the Temp Table ttPartPlant so your code is never being called. Your code states:

for each ttPart where (ttPart.RowMod = 'U' or ttPart.RowMod = 'A') no-lock.
ttPart.ShortChar05 = 'M'.
ttPart.Date01 = TODAY.
End.

You need to add the following after your existing code:

For each ttPartPlant no-lock where (ttPartPlant.RowMod = 'A' or ttPartPlant.RowMod = 'U').
For each Part no-lock where (ttPartPlant.Company = Part.Company and ttPartPlant.PartNum = Part.PartNum).
If available Part then do:
Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE, 'ShortChar05', 'M').
Run lib\UpdateTableBuffer.p(input BUFFER Part:HANDLE, 'Date01', TODAY).
End.
End.
End.

--- In vantage@yahoogroups.com, "cooner_55421" <cooner_55421@...> wrote:
>
> Hi,
>
> I've asked this before, it's been a while with no luck, thought I'd try again.
> I have set up a pre-processing BPM on the Part Update method.
> No conditions, just an action:
> The BPM updates UD fields if I change values while on the part tab in part maintenance.
> I would also like to update these UD fields if I change any values while on the Part Plant tab.
>
> Here is the current action:
>
> for each ttPart where (ttPart.RowMod = 'U' or ttPart.RowMod = 'A') no-lock.
> ttPart.ShortChar05 = 'M'.
> ttPart.Date01 = TODAY.
> End.
>
> Any ideas how I can update the UD fields when a change happens to values on the Part Plant tab?
>
> Thanks
>
Have you done a trace on updates, to verify which business methods are being
called?



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
cooner_55421
Sent: Tuesday, January 25, 2011 12:21 AM
To: vantage@yahoogroups.com
Subject: [Vantage] BPM Part Update method and PartPlant updates?





Hi,

I've asked this before, it's been a while with no luck, thought I'd try
again.
I have set up a pre-processing BPM on the Part Update method.
No conditions, just an action:
The BPM updates UD fields if I change values while on the part tab in part
maintenance.
I would also like to update these UD fields if I change any values while on
the Part Plant tab.

Here is the current action:

for each ttPart where (ttPart.RowMod = 'U' or ttPart.RowMod = 'A') no-lock.
ttPart.ShortChar05 = 'M'.
ttPart.Date01 = TODAY.
End.

Any ideas how I can update the UD fields when a change happens to values on
the Part Plant tab?

Thanks





[Non-text portions of this message have been removed]
In version 9 and above it appears that progress allows you to update/insert tables directly and you can disable the triggers.
Prior to version 9 you'd use this:

Run lib\UpdateTableBuffer.p(input BUFFER <Table>:HANDLE, '<Field>',<Value>).

Here is an example (in your case you'd use the part table instead of the OrderDtl table):

def var OrderNum as integer.
def var OrderLine as integer.

OrderNum = GetCurrentOrderNum().
OrderLine = GetCurrentOrderLine().

[This if statement validates that the update instruction is done for the company, order number and line with this input]

If OrderNum > 0 and OrderLine > 0 then do:
Find OrderDtl where OrderDtl.Company = "VN10T" and Orderdtl.OrderNum = OrderNum and OrderDtl.OrderLine = OrderLine no-lock no-error.

[And then perform the update with the value entered in the input]
Run lib\UpdateTableBuffer.p(input BUFFER OrderDtl:HANDLE, 'OrderQty', Quantity).

End.




________________________________

From: vantage@yahoogroups.com on behalf of cooner_55421
Sent: Tue 1/25/2011 12:20 AM
To: vantage@yahoogroups.com
Subject: [Vantage] BPM Part Update method and PartPlant updates?




Hi,

I've asked this before, it's been a while with no luck, thought I'd try again.
I have set up a pre-processing BPM on the Part Update method.
No conditions, just an action:
The BPM updates UD fields if I change values while on the part tab in part maintenance.
I would also like to update these UD fields if I change any values while on the Part Plant tab.

Here is the current action:

for each ttPart where (ttPart.RowMod = 'U' or ttPart.RowMod = 'A') no-lock.
ttPart.ShortChar05 = 'M'.
ttPart.Date01 = TODAY.
End.

Any ideas how I can update the UD fields when a change happens to values on the Part Plant tab?

Thanks






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