Autosplitkey problem!

Nav_Nav
Member Posts: 7
This is the situation: I have a main form with a subformcontrol.
The subformcontrol has the following properties set to YES in the subform:
- AutoSplitKey
- DelayedInsert
- AutoPopulateFields
I can insert several lines in the subform, as long as I stay with one main record. As soon as I change the main record and try to add lines there, the following error pops up: "No. '10000' already exists". I made no changes to the default sorting order and the primary key of the subform table is an integer.
The numbers that are being generated as long as I stay with one main record:
10000
20000
30000
To make things worse, even older custom forms where everything used to work fine with the subform, keep giving the same error message now.
I'm really out of options here ](*,) , could anyone please help?? [-o< [-o<
The subformcontrol has the following properties set to YES in the subform:
- AutoSplitKey
- DelayedInsert
- AutoPopulateFields
I can insert several lines in the subform, as long as I stay with one main record. As soon as I change the main record and try to add lines there, the following error pops up: "No. '10000' already exists". I made no changes to the default sorting order and the primary key of the subform table is an integer.
The numbers that are being generated as long as I stay with one main record:
10000
20000
30000
To make things worse, even older custom forms where everything used to work fine with the subform, keep giving the same error message now.
I'm really out of options here ](*,) , could anyone please help?? [-o< [-o<
0
Comments
-
And what is the key of the table you are using in that form ?0
-
And is there a link between the form and the subform ? if so, it will try to put a filter on the subform, with the value of the mainform ( as specififed in that link ) and it will try to insert a line with that. If the value that is used for the link is 10000, and there is already a value 10000 in the subtable, i think you'd get that error.
btw, normally the subtable has the PK of the main table PLUS another field ( the integer ) as a PK. Like with the sales header/sales line combination0 -
It seems you are missing something...
If the PK of main form is 'No.'(code), then PK for subform must be something like 'No.'(code), 'Line No.' (integer) to have correct lines. If you have PK in sbtable only the No. (it means the line no.), there can be only one entry with line no. 10000 etc. and if you add some other filter, than you are not able to insert the records there...0
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