fieldref and validate

Jens_Madsen
Member Posts: 23
I'm having trouble validating values into a fieldref variable.
example:
varibles
In example A I get an l_blnRetVal of FALSE, but in B it works just fine. I've tried using temporary code-variable but that also fails...
Is it me or are there still some minor flaws in Attains new dynamic access of records and fields ???
example:
varibles
l_varTemp of type Variant l_codTemp of type Code[20] l_blnRetVal of type Boolean l_rRecMyRecord of type RecordRef l_rFldMyField of type FieldRef A): l_rRecMyRecord.OPEN(18); l_rRecMyRecord.INIT; l_rFldMyField := l_rRecMyRecord.FIELDINDEX(1) ; l_varTemp := '12345678901234567890'; l_blnRetVal := l_rFldMyField.VALIDATE(l_varTemp) ; B): l_rRecMyRecord.OPEN(18); l_rRecMyRecord.INIT; l_rFldMyField := l_rRecMyRecord.FIELDINDEX(1) ; l_varTemp := '12345678901234567890'; l_rFldMyField.VALUE := l_varTemp;
In example A I get an l_blnRetVal of FALSE, but in B it works just fine. I've tried using temporary code-variable but that also fails...
Is it me or are there still some minor flaws in Attains new dynamic access of records and fields ???
0
Comments
-
VALIDATE is a VOID it has no return value :?
l_blnRetVal := l_rFldMyField.VALIDATE(l_varTemp);
just
l_rFldMyField.VALIDATE(l_varTemp);0 -
If that's the case then why does the documentation(F1) contain this ?f.VALIDATE
Skriv ny virksomhedsnote
Use these functions to call the triggers for the field you specify.
Record.VALIDATE(Field [, NewValue])
Ok := fieldref.VALIDATE([NewValue])
Field
Data type: field
A field with associated triggers.
NewValue
Data type: must be same data type as Field, or a data type that is convertible
The value to insert in Field.
filedref
Data type: fieldref
The fielref of the field with associated triggers.0 -
Hmm it's an error in the documentation :shock:
Should have been...
fieldref.VALIDATE([NewValue])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