CurrRec,Rec Variable and Clear All Function

mthe80
Member Posts: 27
Dear all,
Can u explain me about the CurrRec and Rec Variable. I already looked on the help, but it didn't give me any information. Does this thing Hardcoded by Navision? Cause when I read about ClearAll Function, it says that it won't clear the Rec variable.
TIA
Can u explain me about the CurrRec and Rec Variable. I already looked on the help, but it didn't give me any information. Does this thing Hardcoded by Navision? Cause when I read about ClearAll Function, it says that it won't clear the Rec variable.
TIA
0
Comments
-
Rec is a default variable you get with some navision objects.
On a form it is the record the user is viewing.0 -
Dear Mark,
So CurrRec is the record I see on screen. SO does the Rec?0 -
Sorry, Don't know CurrRec
Where have you seen this?
I was refering to Rec.0 -
Codeunits have a property called TableNo
Help remarks for this isUse the lookup to select the appropriate table number. If the codeunit can apply to any table, then choose Undefined.
If you specify a table number for this property, then you can use the CurrRec global variable in the codeunit and use the Codeunit.RUN Function (Codeunit) to execute the code unit0 -
I didn't know CurrRec existed and I've been using NAV for almost 10 years.
You learn something new every day.
I can't see the need for it to be honest.
Just use a Record variable to work on a Table.0 -
Just because online help says something, that does not mean it is actually true.
Setting the TableNo property actually adds a VAR Rec : Record ... parameter to the OnRun trigger. No more magic is involved, no CurrRec variable is accessible.
Codeunit_variable.RUN or CODEUNIT.RUN(ID) can be used with or without the property set. If the property is set you must use the Record parameter, if not you must not. Depending on which variation you use you'll get a compile time error or a run time error if you do it wrong.
Furthermore, don't look for the value "Undefined" in the lookup, nor try to type it in yourself. There is no such value accepted. Instead, don't define the property, or clear it's value to make it undefined.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