Simple problem but disturb me !!
Angelo
Member Posts: 180
Hello, Master Navision...
I have a simple problem
When I lookup a form :
IF FormA.RUNMODAL = ACTION::LookupOK THEN BEGIN
IF A THEN BEGIN
<do something>
END ELSE ERROR(text0001);
END;
When Error appear,then I click OK, FormA will disappear. I want it remain appear. How Can I do that ?
Anyone can help me?
I have a simple problem
When I lookup a form :
IF FormA.RUNMODAL = ACTION::LookupOK THEN BEGIN
IF A THEN BEGIN
<do something>
END ELSE ERROR(text0001);
END;
When Error appear,then I click OK, FormA will disappear. I want it remain appear. How Can I do that ?
Anyone can help me?
0
Comments
-
Hi Angelo,
IF FormA.RUNMODAL = ACTION::LookupOK
means that you are closing the FormA by press ok.
If you use ERROR then system will terminate all executions of C/Al codes.
It means that it is the end of your codes.
Then all your codes which try to open FormA will be ignored.
hope this helps,
Jemmy0 -

it means that we can't handle it and let it will be like that....
my scenario :
when FormA.runmodal from coding in formB, FormA will appear n user must fill something completely, if not complete, there is an error appear n I want FormA dont disappear, so the user can fill again without click something for enter formA again....
0 -
Hi Angelo,
You could place the check inside FormA in the OnQueryCloseForm and disable the form from closing in case data are not complete, or you could replace ERROR( with MESSAGE( and use a repeat statement like:A:=''; REPEAT IF FormA.RUNMODAL = ACTION::LookupOK THEN BEGIN IF A THEN BEGIN <do something> END ELSE MESSAGE(text0001); END; END; UNTIL A<>'';
I suggest you use the first suggestion...0 -



Hi, Arhontis.....
That's Great Man !!!!
Thx...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
