Clearing field after prompting an error message

liizz
Member Posts: 125
I have put a code on Lookup of a customised table.
IF Balance > Customer."Credit Limit (LCY)" THEN
ERROR(Insert another customer name);
CustName:='';
After prompting the error message, the field CustName should be cleared automatically.
I have assigned it to an empty string but it is not being cleared. I have even used the CLEAR(CustName) too.
Please help..
Thanks
Liizz
IF Balance > Customer."Credit Limit (LCY)" THEN
ERROR(Insert another customer name);
CustName:='';
After prompting the error message, the field CustName should be cleared automatically.
I have assigned it to an empty string but it is not being cleared. I have even used the CLEAR(CustName) too.
Please help..
Thanks
Liizz
0
Comments
-
Try this:
IF Balance > Customer."Credit Limit (LCY)" THEN BEGIN
CustName:='';
ERROR(Insert another customer name);
END;0 -
The Process stops at error message..it will not go to next line..
If you want to proceed further use Message..0 -
liizz wrote:
CustName - OnLookup()
IF Balance > Customer."Credit Limit (LCY)" THEN
ERROR(Insert another customer name);
CustName:='';
The code which I shared, it is showing the error message but it continues further processing.
Also, I commented the part 'CustName:='';'. It allows processing after the error message.
Can somebody please clarify me?
Thanks
Liizz0 -
How do you know that the process is continues further?0
-
liizz wrote:liizz wrote:
CustName - OnLookup()
IF Balance > Customer."Credit Limit (LCY)" THEN
ERROR(Insert another customer name);
CustName:='';
The code which I shared, it is showing the error message but it continues further processing.
Also, I commented the part 'CustName:='';'. It allows processing after the error message.
Can somebody please clarify me?
Thanks
Liizz
Definitely some problem in your analysis. The code is not continuing after the ERROR. If yes, whole NAV will broke... :-) May be in the real code you have message and not error...0 -
It definitely does not process code any further after ERROR statement!!0
-
It definitely does not process code any further after ERROR statement, and that is precisely the reason why the CustName variable was not getting cleared.0
-
It is required to revert the data changes on the server to be ready for the next change of data. This revert of data makes it possible to change the next field eventhough there is an error in the first.Eric Beran
Software Design Engineer II
Dynamics NAV Office 365
Microsoft
This posting is provided "AS IS" with no warranties, and confers no rights.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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