Error "No PK nor FK" while saving

575 views
Skip to first unread message

ltanderl

unread,
Oct 12, 2015, 10:52:48 AM10/12/15
to iDempiere
Hi Community,

well we tried to create a own window with one main tab and a sub tab. At first it looks like it works but then when we try to save the error "No PK nor FK" shows up.
We created our own tables and they have their own Primary keys and Foreign keys. The keys show even up in the window "Tabel & Columns".

Then we tried it with the following Video:
https://www.youtube.com/watch?v=F1lFHS2riG4
We didnt created a Custom Model but the error stays the same.

Any advice would be appreciated.

Regards
Andreas

Diego Ruiz

unread,
Oct 12, 2015, 11:39:56 AM10/12/15
to iDempiere
Hi Andreas,

It can be that int he Window Tab & Field window -> Tab you didn't fill the Link column field to define the FK for the detail tabs.

Please check it.

regards,
Diego Ruiz

hardik.kubavat

unread,
Oct 12, 2015, 1:03:04 PM10/12/15
to idem...@googlegroups.com
Hello,

Go to the table and column and check the Key Column check box in the primary key column.

Thanks,
Hardik

M: +91 940 908 2607
E: hardik....@knowarth.com
W: www.knowarth.com 


--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/2dbd1a00-0920-4ad8-af82-6a2580bce1f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ltanderl

unread,
Oct 19, 2015, 6:25:07 AM10/19/15
to iDempiere

Hi,

first sorry for the late Answer. Well the Error is gone now but we get a new Error. With the Foreign Key in Place we cannot save. When we click on the save button everytime this Error pops up: Record not deleted - dependent record found: ERROR: insert or update on table "cus_to_do_list_mk5" violates foreign key constraint "Work_to_Sub_FK" - Detail: Key (cus_to_do_list_id)=(1000003) is not present in table "cus_to_dosub_list_mk5". Just with a higher Number. So why the hell Idempiere wants to delete something when ther is nothing? I dont get it.....

regards
Andreas

redhuan d. oon

unread,
Oct 20, 2015, 11:43:26 AM10/20/15
to iDempiere
Can you post the stack error trace from the console?

ltanderl

unread,
Nov 2, 2015, 6:10:11 AM11/2/15
to iDempiere

Hi Red,

we tried to change an existing Window that worked but then it no longer works. The Error stays the same no matter what we do.

sorry for the late reply. Here is our Log-File with the Error in it. The last few lines are the DB-Update-Error.

thx for your Time

regards
Andreas

idempiere.2015-11-02_0.log
Reply all
Reply to author
Forward
0 new messages