Hi Guys,
Solved this issue in a simple way.
Just made the Form 1 invisible and called Form 2 using RUNMODAL.
So, Now Form 2 will have focus and as for the user is concerned he is not able to see the Form1 and is allowed to continue work on Form2.
Thanks all for your valuable sharing knowledge.
Answers
When you run form2.runmodal the form2 became the focus,will be opend and form1 can not became an focus and no transaction will run.
The user can't change the record in form1
When you set an
Form2.runmodal;
CurrForm.close(); //Form1
The form 1 wll be closed when form 2 is closed.
I have to open Form2 form Form1. At the same time I have to close Form1 making Form2 in open state.
Thanks.
Are you trying to make Navision works like a Web based form?
Anyway, I've done this before.
1. Create a form called "Form 1", with a command button, and in the OnPush Trigger, put CurrForm.CLOSE;
2. Create a form called "Form 2", just a blank Form will do for this example.
3. Create a Codeunit, say Codeunit1, OnRun Trigger, put FORM.RUN(FORM::"Form 2");
4. Go Back to "Form 1", at the OnCloseForm Trigger, put Codeunit1.RUN;
I believe this will achieve your objective
Rgds,
Jon.
Jon.
You just use FORM.RUN function.
So... when you open "Form 2" Navision close immediatly "Form 1".