I have a Tabular-Type form link to Fields table.
I open this form from another form filtering the records for table 18 Customer.
I have an extra column (text 250 chars) where you can type any value for any field you like. For example you can type for field 91 a value.
Field 91 is the Post Code field in customer table.
I want to add some code in OnLookup trigger to open the related table to be able to select records. For example I want to be able to press F6 button in Post Code field and open the Post Code table to select a value.
I used RecordRef and FieldRef types, and I can retrieve the Table Relation for Post Code field in Customer table which is 225 but I am stack, I dont know how to make it work as a Lookup form.
//OnLookup - CONTROL
RecRef.OPEN(field.TableNo); //table 18 Customer
FldRef := recref.field(field."No."); //field 91 Post Code
if FldRef.RELATION > 0 then //returns Table No 225 which is the Post Code table
//here it must open the related form and get the value
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
This problem interested me so I had a look - like you both I looked at the field table with no joy but I then decided to RTFM and I found this.....
i.e.
form.run(0, Custrec ); - runs the customer list
form.run(0, LocationRec ); - runs the location list
Unfortunately it doesn't run on a recordref but hopefully it's of some help to you.
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.