• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Duplicate Keys Not Allowed - Header/Detail

DBohner-(db)

Legendary Poster
OK, i am having a brain cramp...

I have a header detail form - with a grid. This is a custom form - so, I don't think I can blame JDE :)

I fill out the grid -> hit the OK... and I get an errorm, "Error: Duplicate Keys Not Allowed." I look at the table - and the only, apparent, chance of a duplicate key is the table row with all blanks or nulls...

The null grid row (created at the bottom of the grid each time a new row is created) is, apparently, being inserted to the table..

What are my options? What is my oversight?

thanks!

Daniel Bohner
drbohner@existinglight.net
www.existinglight.net
JDE - XE & AS/400
JDE - B7331 & MS SQL 7x
 

Christian Audet

Moderator
Staff member
Daniel,

This is a error that normaly append when value common to header and detail are being sent with NULL values to the table.

Do you have any Event Rules that transfert value from the header to the detail in the grid?

Give us more info on the two table, give us the link(fields) between the header and the detail and give us the event rules that you have in place to transfert the header info to the detail (the grid).

If this is what I think only your key field in the detail table are NULL. Do you have the record inserted in the header table ?

Every time I'm giving a training to new developper they get this error, so that's why I think we will fix it.

OK, this is a lot of question but I'm sure that will help.

Christian Audet

Implementing B7333 (Xe) SP14.1, SQL
(Support B732, B7331 and B7332)
 

Zoltan_Gyimesi

Legendary Poster
Hi Daniel,
Your issue is really strange.
Please, let us know on which platform of your both does it happen or on both? The SP level also could be relevant. (my suggestion, extend your signature with your SP leveles :)

Just only a suggestion: do not allow blank entry for the most important key field. Maybe it isn't a real solution but who knows, maybe could help.

Regards,
Zoltán

B7332 SP11, ESU 4116422, Intel NT4, SQL 7 SP1
(working with B7321, B7331, XE too)
 
Top