We recently did a test upgrade from NAV2015 to NAV2017 and doing some testing of custom functionality. We noticed a strange behavior of the NAV System table 'Date'. Apparently the table does not filter correct on the boxes of the customer, while this behavior is not occurring on our test-server.
Here is a brief explanation of the issue:
Code:
UseOrderDate := 041417D;
Date.SETRANGE("Period Type",Date."Period Type"::Date);
Date.SETRANGE("Period Name",'Friday');
Date.SETFILTER("Period Start",'>=%1',UseOrderDate);
IF Date.FINDFIRST THEN
MESSAGE('Date = %1',Date."Period Start")
ELSE
MESSAGE('Date not found.');
Results:
- On our server the result is correct, as:
'Date = 04/14/2017.
- On the customer server (we tried a few different boxes, but same result):
'Date = 01/03/0001'.
According to the Customer's IT person and SQL specialist this behavior is not related to any SQL server setting.
The only difference is that we use 'SQL-2012' as our test server while our customer is using 'SQL-2016'.
I would assume that SQl-2016 is compatible with NAV2017. (build: 10.0.14199).
Any ideas?
Here is a brief explanation of the issue:
Code:
UseOrderDate := 041417D;
Date.SETRANGE("Period Type",Date."Period Type"::Date);
Date.SETRANGE("Period Name",'Friday');
Date.SETFILTER("Period Start",'>=%1',UseOrderDate);
IF Date.FINDFIRST THEN
MESSAGE('Date = %1',Date."Period Start")
ELSE
MESSAGE('Date not found.');
Results:
- On our server the result is correct, as:
'Date = 04/14/2017.
- On the customer server (we tried a few different boxes, but same result):
'Date = 01/03/0001'.
According to the Customer's IT person and SQL specialist this behavior is not related to any SQL server setting.
The only difference is that we use 'SQL-2012' as our test server while our customer is using 'SQL-2016'.
I would assume that SQl-2016 is compatible with NAV2017. (build: 10.0.14199).
Any ideas?