Written Lookup for a FlowFilter

elmarfv
Member Posts: 53
Hi all,
I am trying to write a lookup code for a FlowFilter, I am able to retrive the filter i want into a temp Code variable, then i want to try and set the filter. It is not working very well, if i use SetFilter(<FlowFilter>, TempCode); it does set the fitler, but when i press "Ok" on the "FlowFiler" form, it does not set the fitler. if i use MODFY after setting the filter, not conventional, but i thought i should give it a try, it does set the filter, but also gives me the error, Rec.PrimaryKey = '' does not exist.
I am wandering if I should try and use RecordRef?
I am trying to write a lookup code for a FlowFilter, I am able to retrive the filter i want into a temp Code variable, then i want to try and set the filter. It is not working very well, if i use SetFilter(<FlowFilter>, TempCode); it does set the fitler, but when i press "Ok" on the "FlowFiler" form, it does not set the fitler. if i use MODFY after setting the filter, not conventional, but i thought i should give it a try, it does set the filter, but also gives me the error, Rec.PrimaryKey = '' does not exist.
I am wandering if I should try and use RecordRef?
Elmar F. Vidisson
Certified Navision Attain Developer
Certified Navision Attain Developer
0
Comments
-
What sort of values would "TempCode" typically contain?Kind regards,
Jan Hoek
Product Developer
Mprise Products B.V.0 -
The Client needed the Shortcut Dimensions on the General Ledger Entries. So now they are there. Then he needed the FlowField on the G/L Account to include the new fields, so now they do. Hence I needed a FlowFilter for then ShortCut fields from 3-8. So the return is always a Code, the Dimension Code.
I found out that FlowFilter lookup does not work unless you have a table in the TableRelations. But you can have a code in the OnLookup anyway.
I Then tried to use a FlowField to lookup the Dimension codes, into the GL Setup, 3-8. Then use that field as a filter in the TableRelation. but the "FlowField To Dimension Code 3" did not return it when doing the lookup.
TableRelation := "Dimension Value".Code WHERE (Dimension Code=FIELD(FlowField To Dimension Code 3))
I ended up having the "Dimension Value" table in the TableRelations, and in the Filter for it, I hardcoded the Dimension Codes. This is not good if they change the Dimension Codes, since this company has not gone live yet.
TableRelation := "Dimension Value".Code WHERE (Dimension Code=CONST(INC STATUS)).
Any advice?Elmar F. Vidisson
Certified Navision Attain Developer0
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