How to get a recordRef

Arjan_Somers
Member Posts: 64
Hi everybody,
I want the to get the recordRef to the current Rec.
I know there is no such thing as Rec.getRecRef.
But what is the best way to get a RecRef variable to point to my Rec?
I want the to get the recordRef to the current Rec.
I know there is no such thing as Rec.getRecRef.
But what is the best way to get a RecRef variable to point to my Rec?
0
Answers
-
I don't really understand your problem.
RecRef.GETRECORD or RecRef.SETRECORD isn't the solution?0 -
No not exactly.
I have a RECORD called Rec
And a RECORDREF called RecRef
The Rec is initialized, the RecordRef is not.
Now i want the RecRef to point to the same Record as Rec.0 -
There is a RecRef example in the download section. See if you can find it and take a look at the code in there.0
-
Arjan Somers wrote:No not exactly.
I have a RECORD called Rec
And a RECORDREF called RecRef
The Rec is initialized, the RecordRef is not.
Now i want the RecRef to point to the same Record as Rec.
So why does RecRef.GETRECORD(Rec) doesn't fit? Do you have any Filtergroups or something on the Rec? If you want that RecRef does only points to the current pointed Recordset in Rec you can append a RecRef.SETRECFILTER();0 -
It looks like a usable function, but according to help i have to use it like this:
RecordRef := recordid.GETRECORD
I tried:
RecRef.GETRECORD(Rec)
and
RecRef := Rec.GETRECORD;
And they both don't work.
For First one the compiler says it can't find the GETRECORD function,
And for the second one it gives an error about an invalid type conversion.0 -
pduck wrote:I don't really understand your problem.
RecRef.GETRECORD or RecRef.SETRECORD isn't the solution?
Sorry I meant GETTABLE and SETTABLE!GETTABLE (RecordRef)
Neue Firmennotiz schreiben
Use this function to make a recordref variable use the same table instance as a record variable.
RecordRef.GETTABLE(rec)0 -
Does SETTABLE also sets the recordRef to the current record, or does it just set the recordRef to the Rec's table?0
-
Arjan Somers wrote:Does SETTABLE also sets the recordRef to the current record, or does it just set the recordRef to the Rec's table?
It sets a Record to the RecordRef Instance.0 -
SOLVED
RecRef.SETTABLE(Rec) does not only set the table no., but also makes the RecRec point to the same record and applies the same filters to the RecRef.
Thx a LOT for your help! =D>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