AltSearchField fails when SQLDataType was changed to Integer

Waldo
Member Posts: 3,412
Dear all,
I need your help on an issue.
I am at a customer which we (Mark Brummel and me) converted from Native to SQL.
All works well and we are now finetuning the system.
One of the "bugs" we had to fix was the order of some masterdata tables for which they use integer values. SQL orders them differently.
We changed the SQL Data Type to Integer but after this the AltSearchField returns an error. Is that a known issue?
Any ideas are more than welcome.
A workaround we implemented :
We created a function in a seperate codeunit:
In the table, where we want to use the AltSearchField, we disabled the property "ValidateTableRelation", and added one line of code (OnValidate of that field):
After this workarount, it exacly behaves like it should behave.
I need your help on an issue.
I am at a customer which we (Mark Brummel and me) converted from Native to SQL.
All works well and we are now finetuning the system.
One of the "bugs" we had to fix was the order of some masterdata tables for which they use integer values. SQL orders them differently.
We changed the SQL Data Type to Integer but after this the AltSearchField returns an error. Is that a known issue?
Any ideas are more than welcome.
A workaround we implemented :
We created a function in a seperate codeunit:
AltSearchVendor(pcodCode : Code[20]) : Code[20] //*** Check for numeric IF STRLEN(DELCHR(pcodCode,'=','1234567890')) = 0 THEN BEGIN EXIT(pcodCode); END; lrecVendor.SETFILTER("Search Name", '@' + pcodCode + '*'); lrecVendor.FINDFIRST; EXIT(lrecVendor."No.");
In the table, where we want to use the AltSearchField, we disabled the property "ValidateTableRelation", and added one line of code (OnValidate of that field):
"Charter No." := cduVendCustValidationMgt.AltSearchVendor("Charter No.");
After this workarount, it exacly behaves like it should behave.
0
Comments
-
Wow, are we really the first one with this issue? :?
Well, it is reported to Mircosoft so in case we get an answer (of which I am sure we will) we'll get back on it.0 -
Waldo wrote:We changed the SQL Data Type to Integer but after this the AltSearchField returns an error.
For the table relation, the data type of both fields have to be the same. As you select integer for the field, the search field would have to be of type integer too.
The solution is to use the SQL Data Type VARIANT. This allows the correct sorting for the numeric values and the table relation for the search field.Torsten
MCP+I, MCSE NT, Navision MCT (2004,2005)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