Auto refresh at form

Hi all,

I have created a code to take the description from line to update a field in the header. However after updating, the form will not auto refresh to reflect the value. It will show the description when i close and open the form. I put the checking at the Description field - Onvlidate() at the line table

Here is my code:

IF “Line No.” = 10000 THEN BEGIN

lvrecPurchHeader.RESET;

lvrecPurchHeader.SETRANGE(lvrecPurchHeader.“Document Type”,“Document Type”);

lvrecPurchHeader.SETRANGE(lvrecPurchHeader.“No.”,“Document No.”);

IF lvrecPurchHeader.FINDFIRST THEN BEGIN

lvrecPurchHeader.VALIDATE(“Posting Description”,Description);

lvrecPurchHeader.MODIFY;

END;

END;

Please adivce. Thanks!

hi,

this is nor an easy problem, to refresh the main page from a subpage. but it works with the wsh (windows script host).

regards

Hi ,

Write a code to Refresh the Main form then In the Sub Page form after update ,

Call Element.args().Caller().refresh();

It will show the updated Details

regards

md rhiyas