Number series weirdness

bhalpinbhalpin Member Posts: 309
Hi.

This just started happening:

- Purchase > Order Processing > Invoices

- [F3] to insert new invoice.

- [Enter] from "No." field.

- Error: You cannot assign numbers greater than 9999 from the number series P-INV.

- When you clear the error, a perfectly good/logical number is there (2223).

The P-INV No. Series settings are:

Start: 1001
End: 9999
Last used date: 01/01/08
Last No. Used: 2223

The debugger doesn't stop on anything, so I'm kina at a loss ...

Any ideas on this out there?

Bob

Answers

  • SavatageSavatage Member Posts: 7,142
    Change the End# to 99999999

    sounds strange - any filters set or modifications done?

    You get an error & no debugger info :?:

    is 2223 actually what the number series is saying or what you are saying is the last # used?
  • bhalpinbhalpin Member Posts: 309
    Ok, tried that and same error but with the bigger number. And no stopping in debugger either. (Very weird)

    Code coverage and persistence lead me to codeunit 396 NoSeriesManagement and this is where the error is occuring:
    IF (NoSeriesLine."Ending No." <> '') AND
       (NoSeriesLine."Warning No." <> '') AND
       (NoSeriesLine."Last No. Used" >= NoSeriesLine."Warning No.") AND
       (NoSeriesCode <> WarningNoSeriesCode) AND
       (TryNoSeriesCode = '')
    THEN BEGIN
      WarningNoSeriesCode := NoSeriesCode;
      MESSAGE(
        Text007,
        NoSeriesLine."Ending No.",NoSeriesCode);
    END;
    

    The number being assigned (2224) is greater than the "Warning No." which is 1995, so NAV is kicking up a "warning" using Text007 - which is the same text constant used to report an actual error when the number series is exhausted.

    NAV. A magical mystery tour sometimes, eh?

    Bob
Sign In or Register to comment.