cursor on right record on Lookup

OfLight
Member Posts: 7
Hello,
Lookup function doesn't work correctly every where in Navision !
In fact, From the Form 104 - Account Schedule, making lookup on the "Totaling" field doesn't bring the cursor on the right record when displaying the list of G/L accounts.
when controlling Table 85 - Acc. Schedule Line : field 5 - Totaling, these properties are set :
TableRelation =
IF (Totaling Type=CONST(Posting Accounts)) "G/L Account" ELSE IF (Totaling Type=CONST(Total Accounts)) "G/L Account"
ValidateTableRelation and TestTableRelation are now at <Oui> ! [= yes ! ]
in the other side, there is a code in the totaling textbox (in the form)
IF "Totaling Type" IN
["Totaling Type"::"Posting Accounts","Totaling Type"::"Total Accounts"]
THEN BEGIN
GLAccList.LOOKUPMODE(TRUE);
IF NOT (GLAccList.RUNMODAL = ACTION::LookupOK) THEN
EXIT(FALSE)
ELSE
Text := GLAccList.GetSelectionFilter;
EXIT(TRUE);
END;
EXIT(FALSE);
p.s. : I'm using french version
how to solve this please ?
Thank you for answers.
Lookup function doesn't work correctly every where in Navision !
In fact, From the Form 104 - Account Schedule, making lookup on the "Totaling" field doesn't bring the cursor on the right record when displaying the list of G/L accounts.
when controlling Table 85 - Acc. Schedule Line : field 5 - Totaling, these properties are set :
TableRelation =
IF (Totaling Type=CONST(Posting Accounts)) "G/L Account" ELSE IF (Totaling Type=CONST(Total Accounts)) "G/L Account"
ValidateTableRelation and TestTableRelation are now at <Oui> ! [= yes ! ]
in the other side, there is a code in the totaling textbox (in the form)
IF "Totaling Type" IN
["Totaling Type"::"Posting Accounts","Totaling Type"::"Total Accounts"]
THEN BEGIN
GLAccList.LOOKUPMODE(TRUE);
IF NOT (GLAccList.RUNMODAL = ACTION::LookupOK) THEN
EXIT(FALSE)
ELSE
Text := GLAccList.GetSelectionFilter;
EXIT(TRUE);
END;
EXIT(FALSE);
p.s. : I'm using french version
how to solve this please ?
Thank you for answers.
Do it your self
0
Comments
-
Try this:
Declare a glAcc record for table 15. THEN:
IF "Totaling Type" IN
["Totaling Type"::"Posting Accounts","Totaling Type"::"Total Accounts"]
THEN BEGIN
GLAccList.LOOKUPMODE(TRUE);glacc.SETFILTER("No.",Totaling); IF glacc.FINDFIRST THEN BEGIN GLAccList.SETRECORD(glacc);
IF NOT (GLAccList.RUNMODAL = ACTION::LookupOK) THEN
EXIT(FALSE)
ELSE
Text := GLAccList.GetSelectionFilter;
EXIT(TRUE);
END;
EXIT(FALSE);0 -
Thank you Kapamarou, it works, i'm studying this solution.
Simple and efficient =D>
Have a good day sirDo it your self0 -
You're welcome.
Keep in mind that there other issues about this. For example, if the code does not specify which record to show, the form can open at the last record you were viewing the last time you opened it, or at the first record, or... depending on the properties you have setup on the form.0
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