Options

error message when I click on Accounting Period in navision

yekedeyekede Member Posts: 96
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?

Answers

  • Options
    SD-JRSD-JR Member Posts: 94
    Hi,

    Are you using the GB version?
    Regards,

    Ger
    Simply Dynamics Ltd
    skype: gf.simplydynamics
    Web: www.simplydynamics.ie
  • Options
    Alex_ChowAlex_Chow Member Posts: 5,063
    yekede wrote:
    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?

    This has been addressed in version 5.0sp1.
  • Options
    SD-JRSD-JR Member Posts: 94
    Hi,

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

    Ger
    Simply Dynamics Ltd
    skype: gf.simplydynamics
    Web: www.simplydynamics.ie
  • Options
    yekedeyekede Member Posts: 96
    Thanks for the help. i used the new code and it's ok.
Sign In or Register to comment.