Is it possible to assign RecordRef to Record datatype?

itspeter
Member Posts: 105
recref.open(18); rec=recref; //need to know how can it be pass FORM.RUNMODAL(0,rec);
1.) How to pass recordref to record?
2.) How do I initialize rec? (To which table?)
I'm planning to develop a dynamic lookup forms as common function.
Thanks.
Regards,
Peter Ng

Regards,
Peter Ng
Peter Ng
0
Comments
-
SETTABLE (RecordRef) Neue Firmennotiz schreiben Use this function to make a record variable use the same table instance as a recordref variable. RecordRef.SETTABLE(rec) RecordRef Data type: recordref rec Data type: record See also RecordRef.GETTEBLE.
0 -
I have done that, my main problem is what to define my rec?
rec have to initialize to a table (subtype), but i need to assign it into a dynamic table, i won't know later what table it will pass.rec Data Type: record Subtype: ???????
Navision don't allow me not to define subtype. :?:Regards,
Peter Ng0 -
I guess what you really wish to do is this:
recref.open(18); FORM.RUNMODAL(0,recref);
However; this is not possible. :-(
Well, if you really insist, then I guess it is possible by making a common lookup form based on a Code and a Text field based on a new buffertable. Then it should be possible to have a generic lookup form that shows the first code and first text field of the recref. (Using the same method as showing temp tables). But for a lot of tables this wouldn't make any sence...
What are you trying to accomplish? We might suggest other solutions if we knew more about the problem. :-)Regards
Peter0 -
You mentioned my WISH
. The reason behind is, I just don't want to declare so many records.
I want to develop a common lookup function which is easy to use everywhere, by just passing table id.
Right now, I declare record for each of the tables to lookup in the function, and using select case to identify the parsed table id, then run the lookup form. But, it is too tedious to maintain.
If this function can be done, it will be very useful for other area which require dynamic lookup, which I'll be looking forward to add them in my Dynamic Crosstab report and Dynamic Listing Generator. =P~Regards,
Peter Ng0
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