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
Comments
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.
Navision don't allow me not to define subtype. :?:
Peter Ng
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. :-)
Peter
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~
Peter Ng