Below are the details of the problem i am facing :
Runing FORM B form a menu button in FORM A
Doing process to modify some field values in FORM A (which is still opened in the background)
The issue here is when closing FORM B, FORM A did not get refreshed unless i go to the second line for example.
Any suggestions please ?
What do you mean go to second line? What you trying to do in Form A and Form B, please explain a bit more.
FORM A is the Payment journal form, FORM B is a new form and is ran when you click on a menu item in FORM A.
This FORM B is used to calculate and update some values in FORM A, my problem is when closing the FORM B i am not finding the new values in the journal line (FORM A) unless i do one manipulation like going to the second line, only at this moment the form is refreshed .
You should write your code in a way that when you press OK on form B then it should update values in payment journal which is form a. In standard navision go to item journal for example, there are several functions which call codeunits,process reports and forms to update values in item journal. See how that work and apply in your customization. Good luck.
I think my code here will work and you might want to change the Action to whatever you need (OK, LookUpOK etc.).
At the end of the code use
CurrForm.UPDATE(TRUE); to refresh the form (Form A)
I just replaced FORM B.RUN by IF FORM B.RUNMODAL = ACTION::Close THEN ; and it worked…
Thanks for your suggestions,