Hi all,
I have created a table TableA(field1, field2.....................G/LAccNo). I have set the TableRelation property of G/LAccNo as ""G/L Account".No. WHERE (Account Type=CONST(Posting),Direct Posting=CONST(Yes),Gen. Bus. Posting Group=FILTER(<>''),Gen. Prod. Posting Group=FILTER(<>'')).
I then created a form FormA containing one textbox control "G/LAccountNo". The textbox control has below properties -
LookUp = Yes
LookupFormID = G/L Account List
SourceExpr = "G/LAccNo"
The FormA has SourceTable = TableA.
Now i run the form FormA and click on the assistbutton next to the textbox control "G/LAccountNo". The "G/L Account List" pops up and it shows only those records which are filtered acc. to the table filter which i had set on TableA.
I select No = 8120 and press Ok. The control "G/LAccountNo" now contains the value 8120.
I then close the form FormA and reopen it. Again i click on the assistbutton of the control "G/LAccountNo". The "G/L Account List" pops up but this time the cursor is NOT set on the record with No = 8120.
Each time i try to lookup on the form "G/L Account List" , the cursor is set to the first record of the filtered recordset. However the control does retain the selected No value.
Any idea why this happens and how to set the cursor on the selected record of the lookup form?
Thanks
Regards,
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)
0
Comments
With TableRelation property set for the GLAccNo field of TableA, i do achieve the Lookup functionality but the problem still persist. The cursor is not set on the value displayed in the text box control when i lookup.
The field Field1 of TableA is the primary key.
The reason for providing the table filter is that i will use the GLAccountNo value to create sales lines of type G/L Account and i think Navision uses the same filter if G/L sales lines are to be created on Sales Order or Quote form. Thus i do not want user to select a G/L Account No from Lookup which ultimately cannot be used to create G/L Account sales lines. So i want to display the filtered recordset in the Lookup table.
Hemant
MCTS (MB7-841 : NAV 2009 C/SIDE Solution Development)