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
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