No. Series Code Does Not Exist

the subject above is the error message a user gets when posting a PO (Post Invoice). This just only happens when the WHT is enabled. This is enevitable, WHT must really be enabled. Thanks in advance for any help you can extend

Hi Morris,

Have you already check your setup for No. Series?

Please run with debugger and check the call stack,

At a certain place the system calls the function in the NoSeriesMgt. As a parameter the function receives a number series code from a setup table.

There you know which table and you can add the no. series code to that table.

thanks thomas. options in the debugger are Active, Breakpoint on Triggers, and Code Coverage. where would i check the call stack? mibuso said this is a Bug and that microsoft has no solution for this to date :frowning:

Check Active and Run…

It will directly take you to the error

Switch off the code coverage and the Break on trigger. Keep just the Debugger active.

Then run the application and wait for the error to pop up (Debugger will appear and stop there).
Then Check the “Call stack” window in the debugger (bottom, middle).

There you have - from top to bottom - the list of functions that have been called.
The first line which is NOT in CU NoSeriesMgt is the one which is interesting for you.
Click that line and check the coede in the upper window where the green triangle is in front. There you shoud find a reference to a “No. Series Code” field from a setup table (or a document table like “Posting Nos.” or similar).

Tell us what line the system is then breakinf (what function in what object).
Then we can investigate further,

Hi Thomas

i’m a colleague of morris here’s what i got

NoSeries.GET(NoSeriesCode);
SetNoSeriesLineFilter(NoSeriesLine,NoSeriesCode,SeriesDate);
IF NOT NoSeriesLine.FINDFIRST THEN BEGIN
NoSeriesLine.SETRANGE(“Starting Date”);
IF NOT NoSeriesLine.ISEMPTY THEN
ERROR(

that’s the code i saw.

here is the green triagle where exactly pointing

END ELSE
CODEUNIT.RUN(CODEUNIT::“Purch.-Post (Yes/No)”,Rec);
END;

while in the call stack :

Form 50 Purchase Order<Control79> - OnPush()

thanks in advance

Hi , you need to check whats the value in the

NoSeriesCode (NoSeries.GET(NoSeriesCode):wink:

That variable stores the name of the number series, if your debugging is right .

if you move you mouse over this variable in debug ideally it should show whats in it.

cheers,

gabor

hi faludigabor

here is the code

Codeunit 396 NoSeriesManagement\GetNextNo(NoSeriesCode,SeriesDate,ModifySeries)
Codeunit 28040 WHTManagement\PrintWHTSlips(GLReg)
Codeunit 90 Purch.-Post\OnRun()
Codeunit 92 Purch.-Post + Print\Code()
Codeunit 92 Purch.-Post + Print\OnRun()
Form 50 Purchase Order<Control80> - OnPush()

is this right?

thanks

Hi,

The code may be right (looks ok to me) . Question is do you have the proper configuration (data) done.

What you need to check that if you have the proper number series setup in Table 308 and 309.

Question is what data you are looking for within that table . This is why in the debugger you need to identify the value of that variable.

cheers,

Gabor

Codeunit 28040 is a localized object and it also is the most likely culprit. You need help by somebody who is familiar with the localisation for Philippines.

You need to click the following line in the call stack when the debugger breaks:

Codeunit 28040 WHTManagement\PrintWHTSlips(GLReg)

Then you see what the parameters are being used for the call to the GetNextNo function.

The first parameter should be the NoSeriesCode as far as I remember.

Then check what table holds this value. If you are unsure, just paste the line in here.