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<
0
Comments
- PK: 'No.', code
Table in sub form:
- PK: 'No.', integer
- FK: '... No.', Code (related to main form table)
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 combination
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...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.