Record variable Problem
vikram7_dabas
Member Posts: 611
Can we create Record variable at run time? Suppose I m running 1 report of "Field" DataItem and I put some filters on "Field" DataItem and at run time the "Field" table contains "Table No." field, I want to create the record variables of those "Table Nos".
Vikram Dabas
Navision Technical Consultant
Navision Technical Consultant
0
Comments
-
It is possible using "recordreference" variables.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
How can we do it by RecordReference?Please tell explain me.I never used recordReference?Vikram Dabas
Navision Technical Consultant0 -
Some small example to create a record in table 3:Payment Terms
rer is a recordreference
fir is a fieldreference
// to insert a recordrer.OPEN(DATABASE::"Payment Terms"); fir := rer.FIELD(1); (you can also use table field to find the fields and also the tables) fir.VALUE := 'THENEWCODE'; CLEAR(fir); // when you don't need a reference anymore or change is, it is best to clear it. fir := rer.FIELD(5); fir.VALUE := 'The New Description'; CLEAR(fir); fir := rer.FIELD(4); fir.VALUE := 10.5; CLEAR(fir); rer.INSERT; CLEAR(rer);
to find the previous recordrer.OPEN(DATABASE::"Payment Terms"); fir := rer.FIELD(1); fir.SETRANGE('THENEWCODE'); CLEAR(fir); rer.FINDFIRST; fir := rer.FIELD(5); MESSAGE('%1=%2',fir.NAME,fir.VALUE); CLEAR(fir); fir := rer.FIELD(4); MESSAGE('%1=%2',fir.NAME,fir.VALUE); CLEAR(fir); CLEAR(rer);Now you have to read the documentation on record-,field-,keyreferences and do some experiments.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
Categories
- All Categories
- 73 General
- 73 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
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 333 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