Numbering by pressing F3

tiagofrancis
Member Posts: 48
Hi Folks,
I've built a form based on a table of my one.
Generaly, when i feed the table with some process i look for the last entry number and +=1.
But, when i hit F3 on the form the record does not increment..
What is the best easy way to handle this...?
Thanks in advance..
I've built a form based on a table of my one.
Generaly, when i feed the table with some process i look for the last entry number and +=1.
But, when i hit F3 on the form the record does not increment..
What is the best easy way to handle this...?
Thanks in advance..
0
Comments
-
search the forum about setting up your own number series.0
-
Actually in this case I don't think you need a number series. Either
a/ use a primary key of type BigInteger with the property Autoincrement set (see table 405 for an example) OR
b/you need to find the last record and use code to increment it. (see table 32 for an example)
Note that in a/ above the numbers may not be sequential and some numbers may be skipped. So if you need a contiguous series then use B/David Singleton0 -
You have to write code on insert of table .and call No. series managment codeunit. see any master table oninsert .0
-
David Singleton wrote:Actually in this case I don't think you need a number series. Either
a/ use a primary key of type BigInteger with the property Autoincrement set (see table 405 for an example) OR
b/you need to find the last record and use code to increment it. (see table 32 for an example)
Note that in a/ above the numbers may not be sequential and some numbers may be skipped. So if you need a contiguous series then use B/
If are using option b given by david then you could use this std code.IF JobLedgEntry."Entry No." = 0 THEN BEGIN JobLedgEntry.LOCKTABLE; IF JobLedgEntry.FIND('+') THEN NextEntryNo := JobLedgEntry."Entry No."; NextEntryNo := NextEntryNo + 1; END;
0 -
In what trigger do i have to put the code?0
-
I miss understood your question. I thought that you wanted to auto increment using a codeunit. You will increment in insert the easiest way will be increment using auto increment property.0
-
Hi,,,,
donot forget to set property "NotBlank" to false.
If your data type is integer for this field you should to write code to increment tthis field like below:
YourTable.RESET;
YourTable.SETFILTER("No.","No.");
IF YourTable.FIND('+') THEN
"No. Series":= YourTable."No. Series" + 1
ELSE
"No. Series":=1;
Note: there is autoincrement property in NAVISION for the integer fieldsMaster Navision Developer0 -
Hi,,,,
donot forget to set property "NotBlank" to false.
If your data type is integer for this field you should to write code to increment tthis field like below:
YourTable.RESET;
YourTable.SETFILTER("No.","No.");
IF YourTable.FIND('+') THEN
"No. Series":= YourTable."No. Series" + 1
ELSE
"No. Series":=1;
Note: there is autoincrement property in NAVISION for the integer fieldsMaster Navision Developer0
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