I have parent and child tables. How to I dele...

(John Henry Joseph) #1

I have parent and child tables. How to I delete a parent table row, if there is no entry in child table for that particular parent entry. Fox Example: I have a parent table for Account Heads. The child table is called Transactions. Now If I want to delete one Account Head in Master Table, I need to check in Transactions table, if any entries there related to Accounts Head Table. How can I achieve this?

(Aleksi Alkio) #2

You could create an action button for delete and if that record doesn’t have any related records, you will show the button. If you have them, hide that button.

(John Henry Joseph) #3

But, how to disable the default delete button, which is there in top right side, if you select more than one entry?

(Aleksi Alkio) #4

Open the system actions and modify that delete action with the “If this condition is true”.

(John Henry Joseph) #5

Wow… Thanks lot…You saved my life…

(Aleksi Alkio) #6

You’re welcome