How to put an ERROR('something') into subform

uri84
Member Posts: 30
Hi,
I'm trying to put an ERROR message inside a subform that i have.
IF (TipoFact = TipoFact::Factura) THEN
BEGIN
IF ("Payment Method Code" = 'CONTADO') THEN
BEGIN
IF (Nombre ='') OR (Direccion = '') OR ( Poblacion='') OR ( Rut = '' ) THEN
BEGIN
ERROR ('incomplete');
EXIT;
END
END;
.....
when i press OK in the form and executes this part of code it show me before de error messsage, another error that say :"It's not possible to close the subform sales ..... because the system is busy" or something like that , and you click ok in this dialog en shows the error message.
how can i put an error here?
I'm trying to put an ERROR message inside a subform that i have.
IF (TipoFact = TipoFact::Factura) THEN
BEGIN
IF ("Payment Method Code" = 'CONTADO') THEN
BEGIN
IF (Nombre ='') OR (Direccion = '') OR ( Poblacion='') OR ( Rut = '' ) THEN
BEGIN
ERROR ('incomplete');
EXIT;
END
END;
.....
when i press OK in the form and executes this part of code it show me before de error messsage, another error that say :"It's not possible to close the subform sales ..... because the system is busy" or something like that , and you click ok in this dialog en shows the error message.
how can i put an error here?
0
Comments
-
How are you executing this code?
What trigger?uri84 wrote:or something like that
Have you tried searching the forum for "mandatory fields"
You shouldn't code on forms - use the table0 -
Why is the "EXIT" after the error?
Error alone is enough.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