Hi,
i'm using navision 5.0 and when i click on the Form Accounting Period, i get an error message: 'there is no accounting period within the filter.' Filter:Starting Date >=''
I have used the debugger which shows that in table 5814 there is a fonction which filter a record variable of subtype Accounting Period to the Starting Date coresponding to a date variable called endingdate. i wish to know where this variable endingdate is passed to this fonction to solve the problem. any idea please?
0
Answers
Are you using the GB version?
Ger
Simply Dynamics Ltd
skype: gf.simplydynamics
Web: www.simplydynamics.ie
This has been addressed in version 5.0sp1.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
The code problem is table 5814
OLD CODE
AccPeriod.SETFILTER("Starting Date",'>=%1',EndingDate);
AccPeriod.FINDFIRST;
IF AccPeriod.NEXT <> 0 THEN
EndingDate := CALCDATE('<-1D>',AccPeriod."Starting Date");
SETFILTER("Ending Date",'>=%1',EndingDate);
SETRANGE(Closed,TRUE);
EXIT(NOT ISEMPTY);
END;
NEW CODE
AccPeriod.SETFILTER("Starting Date",'>=%1',EndingDate);
IF NOT AccPeriod.FINDFIRST THEN
EXIT(FALSE);
IF AccPeriod.NEXT <> 0 THEN
EndingDate := CALCDATE('<-1D>',AccPeriod."Starting Date");
SETFILTER("Ending Date",'>=%1',EndingDate);
SETRANGE(Closed,TRUE);
EXIT(NOT ISEMPTY);
END;
If you are using a GB localisation there are further problems on the close fiscal year function
Ger
Simply Dynamics Ltd
skype: gf.simplydynamics
Web: www.simplydynamics.ie