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

poppins
Member Posts: 647
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:
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
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

0
Answers
-
You need to write code on No. - OnAssistEdit() trigger for selecting the No. Series.
check page 42 for example..
Did you try by pressing TAB/Enter...is it generating new number?0 -
mohana_cse06 wrote:You need to write code on No. - OnAssistEdit() trigger for selecting the No. Series.
check page 42 for example..
Did you try by pressing TAB/Enter...is it generating new number?
I tried the following code:IF AssistEdit(xRec) THEN CurrPage.UPDATE;
and got the following error message:You have specified an unknown variable. AssistEdit Define the variable under 'Global C/AL symbols'.
0 -
AssistEdit is a function..you need to add that function also..
If it is not generating any number after pressing TAB/Enter then check the created No. Series properly..
Debug the code..where you have missed the code/setup..0 -
Let NAV be your guide, meaning: have a look in the standard objects how this is done. Note that most code is to be found on the table and not on the page/form.
BTW: have a look at this post Tip #21 - Implementing No. Series.0 -
mohana_cse06 wrote:AssistEdit is a function..you need to add that function also..
If it is not generating any number after pressing TAB/Enter then check the created No. Series properly..
Debug the code..where you have missed the code/setup..
I added the AssistEdit function in the source table of my page and it worked...
Thanks a lot0 -
lvanvugt wrote:Let NAV be your guide, meaning: have a look in the standard objects how this is done. Note that most code is to be found on the table and not on the page/form.
BTW: have a look at this post Tip #21 - Implementing No. Series.
Thanks for the tip0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions