Hi Everyone,
I have the following problem:
During the NAV 2016 Data Upgrade (from 2013R2), when executing the Data Upgrade function it fails on the following code from the Upgrage Toolkit:
IF NOT (EVALUATE(NextCountingStartDate,COPYSTR(NextCountingPeriod,1,DividerPosition - 1)) AND
EVALUATE(NextCountingEndDate,COPYSTR(NextCountingPeriod,DividerPosition + 2)))
THEN BEGIN
NextCountingStartDate := 0D;
NextCountingEndDate := 0D;
END;
Therefore the values in the new "Next Counting Start Date" and "Next Counting End Date" will stay empty.
NextCountingPeriod = '01/01/14..31/03/14'
DividerPosition = 9
What I have tried so far:
1.
Running without the IF EVALUATE() THEN; statment I could retrive the error message in powershell:
SessionId : 16
CodeunitId : 104025
FunctionName : UpdateItemNextCountingPeriod
CompanyName : Test
StartTime : 03/03/2016 12:08:54
Duration :
State : FailedPendingResume
Error : Function 'UpdateItemNextCountingPeriod' in the upgrade codeunit '104025' in the context of the company 'Test' has failed because of the
following error: 'The value "31/03/14" can't be evaluated into type Date.'.
I have my regional settings set to UK format and the service tier is on the same machine.
2.
I also tried to set the service time settings to "Server Time Zone" but it did not help.
<add key="ServicesDefaultTimeZone" value="UTC" />
3.
I created a simple codeunit to try to replicate the issue
OnRun()
DividerTxt := '..';
NextCountingPeriod := '01/01/14..31/03/14';
DividerPosition := STRPOS(NextCountingPeriod,DividerTxt);
IF DividerPosition = 0 THEN
EXIT;
EVALUATE(NextCountingStartDate,COPYSTR(NextCountingPeriod,1,DividerPosition - 1));
EVALUATE(NextCountingEndDate,COPYSTR(NextCountingPeriod,DividerPosition + 2));
This one runs successfully on the same database and service tier, but doesnt work when running the Data Upgrade.
Anyone had the same experience?
Any advice much appreciated.
Marcell
0
Answers
It seems the problem in the process of syncronization of old and new data in NAV 2016 version.
If you look at codeunit 104000 , there is a line which must copy "Next Counting Period" field in Item table from old version to new.
DataUpgradeMgt.SetTableSyncSetup(DATABASE::Item,DATABASE::"UPG Item",TableSynchSetup.Mode::Copy);
But unfortunally it does NOT copy. That's why you have problem.
I would like to suggest to do additional step and do dataupgrade to NAV 2015 and then make upgrade from NAV2015 to NAV2016.
I did this way and had no problem.
I suppose it will help if you need quick solution.
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com