Dimension Flowfilter Issue

tarkmyler
Member Posts: 57
My mission is to add Shortcut Dimension 3,4,5 to the GL Entry table and, modify codeunit 12 to post from the general journal. The goal is to provide the functionality of the Global Dim 1/2 to Shortcut 3,4,5. It should allow flow-filtering at the Chart of Accounts level. So... I've learned a lot about CaptionClass, Codeunit 1.
I'm about 4 hours in and it all seems to be working except one thing.... When I'm on the Chart of Accounts form I can't select the new dimensions from a lookup. They show up with thei correct captions in the flow filter list. When you perform a lookup in the flow filter form they present a lookup form with the correct heading, and with the correct dimension values. However, when you press {Enter] to select a value the form closes, you return to the flowfilter form and the field is blank. You can copy/paste.... not very elegant.
Here's the questionable code ...
OnLookup Shortcut Dimenstion 3 Filter
CodeReturned := LookupAndReturnDimCode(3); //>> To easily trace the value returned
SETFILTER("Shortcut Dimension 3 Filter",CodeReturned);
Function[LookupAndReturnDimCode] - G/L Account Table
EXIT(DimMgt.LookupDimReturnCodeValue(FieldNumber));
Function in Dimension Management Codeunit [LookupDimReturncodeValue]
GetGLSetup;
IF GLSetupShortcutDimCode[FieldNumber] = '' THEN
ERROR(Text002,GLSetup.TABLECAPTION);
DimVal.SETRANGE("Dimension Code",GLSetupShortcutDimCode[FieldNumber]);
IF FORM.RUNMODAL(0,DimVal) = ACTION::LookupOK THEN BEGIN
EXIT(DimVal.Code);
END;
I'm stumped.... the lookup passes a value back to the table OnLookup trigger code, but the SetFilter fails. Hmmmmm.....
Thanks.
I'm about 4 hours in and it all seems to be working except one thing.... When I'm on the Chart of Accounts form I can't select the new dimensions from a lookup. They show up with thei correct captions in the flow filter list. When you perform a lookup in the flow filter form they present a lookup form with the correct heading, and with the correct dimension values. However, when you press {Enter] to select a value the form closes, you return to the flowfilter form and the field is blank. You can copy/paste.... not very elegant.
Here's the questionable code ...
OnLookup Shortcut Dimenstion 3 Filter
CodeReturned := LookupAndReturnDimCode(3); //>> To easily trace the value returned
SETFILTER("Shortcut Dimension 3 Filter",CodeReturned);
Function[LookupAndReturnDimCode] - G/L Account Table
EXIT(DimMgt.LookupDimReturnCodeValue(FieldNumber));
Function in Dimension Management Codeunit [LookupDimReturncodeValue]
GetGLSetup;
IF GLSetupShortcutDimCode[FieldNumber] = '' THEN
ERROR(Text002,GLSetup.TABLECAPTION);
DimVal.SETRANGE("Dimension Code",GLSetupShortcutDimCode[FieldNumber]);
IF FORM.RUNMODAL(0,DimVal) = ACTION::LookupOK THEN BEGIN
EXIT(DimVal.Code);
END;
I'm stumped.... the lookup passes a value back to the table OnLookup trigger code, but the SetFilter fails. Hmmmmm.....
Thanks.
Mark Tyler
Pacific City, OR
Pacific City, OR
0
Comments
-
Hi Mark
Try SETFILTER(("Shortcut Dimension 3 Filter",'%1',CodeReturned);
Regards
Albert0 -
Did you add numbers 3 and 4 and fill them in table 349 field Global Dimension No.(dont know if you need to modify filters in addition, but probably)?
If you auto-fill global dim values from your own code this is a field a lot of developers forget to fill.0 -
I am using table 349, Global Dimension No. 3,4,5 respectively and it doesn't help. Also tried the '%1' filtering suggestion, with out success. This one really frys my burger.
The only difference to the flowfield definitions (Global to Shortcut) in the modified G/L Account table is the caption class. As I said, the lookup works, but doesn't successfully set a flowfilter when it returns a value. There is no onlookup code on the Global, so this has to be an Application Management codeunit (1) issue. I've traced it through there a few times, but realized if I changed the code for globals to add 2,3,4 it get's deep quick.
Still searching...Mark Tyler
Pacific City, OR0
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