PopUp Message while creating a new product (Beginner)

heynem
Member Posts: 13
Hi everybody,
I am quite new in programming Navision. Therefore my question seems a little bit stupid
I want to apply the following changes during the process of creating new productcodes. I want that the user go direct in the field (with TAB) which should be next. I have sort this out with the option "NextControl". But I want also in the field "EAN" that the user get a PopUp when the field is empty => "are your sure there is no EAN code ??"
Can somebody tell me where I need to place what kind of Code ???
Thank you very much in advance for your support
Michael
I am quite new in programming Navision. Therefore my question seems a little bit stupid

I want to apply the following changes during the process of creating new productcodes. I want that the user go direct in the field (with TAB) which should be next. I have sort this out with the option "NextControl". But I want also in the field "EAN" that the user get a PopUp when the field is empty => "are your sure there is no EAN code ??"
Can somebody tell me where I need to place what kind of Code ???
Thank you very much in advance for your support
Michael
0
Comments
-
The best position for your code should be the OnAfterValidate-Trigger.
Rough and dirty code:OnAfterValidate() IF EAN = '' THEN IF NOT CONFIRM('Are your sure there is no EAN code?',FALSE) THEN CurrForm.EAN.ACTIVATE;
Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Are you sure you want to do this? It's not really the Navision-style of handling data entry errors. Please take a closer look at the base application and reconsider!Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
Make sure that this code only runs when you're on a form. You do not want to have popup messages in automated processes, and by inserting this type of code in the OnValidate, you will have the message everywhere that the field is validated.0
-
Hi,
Best is, as Jan said, to do this Navision style,
Navision checks at 2 places mostly
1). If the item is used in e.g. a salesorder or purchase order. You can use TESTFIELD(EANCODE) in Table 37
2). When posting in e.g. codeunit 80, or 22! just retest the EAN code.
For some customers is takes getting used to, but after a while they get used to it.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