Update field on Purchase Line

I would like to be able to assign different Vendor Order No.'s to our Purchase Lines. That’s no problem. But how do I achieve the fields on the lines to be automatically updated when the field on the header is changed? I’ve come this far: In Table 39 Purchase Line I added a new field fCodVendorOrderNo. In Table 38 Purchase Header I added in the Vendor Order No. - OnValidate: IF “Vendor Order No.” <> xRec.“Vendor Order No.” THEN UpdatePurchLines(FIELDCAPTION(“Vendor Order No.”)); And in the UpdatePurchLines(ChangedFieldName) of the same table: FIELDCAPTION(“Vendor Order No.”) : UpdateConfirmed := CONFIRM(STRSUBSTNO( Text032 + Text033,ChangedFieldName)); Now I’m getting a message in the Purchase Order when changing the field, but the lines aren’t updated yet. Can anyone tell me how to proceed?

Hi Michiel In the function UpdatePurchaseLines there is another Case Statement within a repeat Loop(Purchase Lines). You need to add the Code there do update the actual Line(s)

Eeehh, could you be a bit more specific Stephen? I’m just a humble end user [:I]

Ha! Already did it! Thanks Stephen!

The second pience of code just generates an error message, you ahve to also add the code that changes the data. In reality the problem reading between the lines, is that as an end user, you have spent lots of money to purchase the Developer tools, and now don’t have the training to use them. I would recommend going to your NSC, and asking for some training. After spending all that money to buy the Application Builder, you should invest in training as well.

Hi Michiel I agree with david reading between the lines. I started off with an end user, We had two guys come in to train us, one of them was an Aussie, David Singleton, perhaps he might want to do the training.

I’ll keep it in mind [8D]