Hi there, I am using RecordRef and FieldRef to get values from tables that the user specifies. He enters the table number into a setup table and the field to get the value from. I need to allow him to do a DrillDown with only the Table number to go on. I don't want to create a bunch of Record Variables or Form Variables. And using FORM.RUNMODAL(0); Requires a Record Variable. Is there maby some way I can create a Record Variable on the fly??
Hope somebody can help me out.
Elmar Freyr Vidisson
Navision Attain Certified Programmer
0
Comments
Well not yet that is, how knows what the future will bring.
I made a sample one time. Maybe it's off any help.
downloadable here: http://www.mibuso.com/dlinfo.asp?FileID=276
If it was hard to write, it should be hard to understand."
The only thing that is really missing is the ability to do something like FORM.RUNMODAL(0,Customer); Just instead of having it the table CUSTOMER, I need to have it a RecordRef to that Table, without creating a variable. Maby FORM.RUNMODAL(0,RecordRef.NAME); I tried this along with many variations, and nothing seems to work. Any ideas of how to acomplish this?
Navision Attain Certified Programmer
Well not yet that is, how knows what the future will bring
Really, this is a big problem. I made lot of really nice applications based on recordrefs. But I always have to make a codeunit or a function to show a form per record....
You have to do something like this:
* Code have'nt been tested!
If it was hard to write, it should be hard to understand."
The only problem is that you can not apply filters to the record, because they get lost when you assign RecRef to the Variant variable. First record in the filter DOES get selected though. Example below:
I hope that helps someone else too.
Nice trick,
But how to get the selected value back?
I have researched a bit further but haven't been able to retrieve the selected value back. I guess that you still need the record variable to make a lookup...