How to link a series no. to a field in a page

Hi everyone,

I am creating a page and I want the field No. to be generated by a series no.

I created a new series no. in the series no. page, I assigned it to my page in the setup page(I created it too) and I used the following code in the source table of my page:

OnInsert()
expMgtSetup.GET;
IF "No." = '' THEN BEGIN
expenseMgtSetup.TESTFIELD(Number);
NoSeriesMgt.InitSeries(expenseMgtSetup.Number,xRec."Series No.",0D,"No.","Series No.");

No. - OnValidate()

IF "No." <> xRec."No." THEN BEGIN
exMgtSetup.GET;
NoSeriesMgt.TestManual(expenseMgtSetup.Number);
"Series No." := '';
END;

END;

but I got nothing, when I try to make a new page, the field No. shows as a textbox with no button to select the series no…
I wonder what shall I do to link this particular series no. to my page…
What am I missing?

Thanks in advance :)

take a look here:

http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/13/tip-26-implementing-no-series.aspx

It worked, thanks for the tip