doubt in TESTFIELD
rockartik
Member Posts: 10
Hey Folks...
If TESTFIELD is gave with single parameter means what does it implies...?? :-k
for an example...
In the code unit no 211 Res. Jnl.-Check Line
WITH ResJnlLine DO BEGIN
IF EmptyLine THEN
EXIT;
TESTFIELD("Resource No.");
TESTFIELD("Posting Date");
TESTFIELD("Gen. Prod. Posting Group");
IF "Posting Date" <> NORMALDATE("Posting Date") THEN
FIELDERROR("Posting Date",Text000);
In the highlighted code
what it will be returned??
what if the condition is failed??
Thanks in advance
If TESTFIELD is gave with single parameter means what does it implies...?? :-k
for an example...
In the code unit no 211 Res. Jnl.-Check Line
WITH ResJnlLine DO BEGIN
IF EmptyLine THEN
EXIT;
TESTFIELD("Resource No.");
TESTFIELD("Posting Date");
TESTFIELD("Gen. Prod. Posting Group");
IF "Posting Date" <> NORMALDATE("Posting Date") THEN
FIELDERROR("Posting Date",Text000);
In the highlighted code
what it will be returned??
what if the condition is failed??
Thanks in advance
0
Comments
-
It is better to look for the product help it will help you learn many other things as well :!:Thanks,
Ritesh K Singh0 -
You use TESTFIELD to test the value of the field. There are two parameters, the field and the value. If you only use 1 parameter (the field) then it will test to make sure it is not blank. If you provide both parameters, it tests to make sure the field has the specified value. If it doesn't have the specified value, the system shows a standard error message (field x must be <specified value> in record <primary key values>).
Ritesh is right though, the help system contains most of this information. Go to the help menu, open the C/SIDE Reference Guide, and search for the things you want to learn about. This will give you syntax and explanations, and sometimes code samples.0 -
I didn find any examples of using single parameter in reference manual..
Now i understood
Thanks Daniel.. :P0 -
-
the manual states : "...If you omit Value and the content of the field is zero or blank (empty string), the system also displays an error message."rockartik wrote:I didn find any examples of using single parameter in reference manual..
Now i understood
Thanks Daniel.. :P0 -
Categories
- All Categories
- 75 General
- 75 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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
