Could not delete the record Message

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
SkayyHH
Veteran Member
Posts: 425
Joined: 2015-04-27 21:18

Could not delete the record Message

Post by SkayyHH » 2022-09-12 05:29

I have a question about the AppGini messages.

If I want to delete a data record that is related to another table, I get the message that the data record cannot be deleted because it is dependent on table "XYZ".

Example: "Could not delete the record due to the presence of 1 related record(s) in table [absence_de]"

I would have liked to see the description of the table instead of the database name here. So that a user also knows which table is behind it. Can someone help me change that? Did anyone else do this before? Any tipps?

Exampel what i´m looking for: "Could not delete the record due to the presence of 1 related record(s) in table [Employee Status]"

Many thanks for your help!

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Could not delete the record Message

Post by pbottcher » 2022-09-12 20:22

Hi,

chech in the TABLENAME_dml.php file and search for the TABLENAME_delete function.

Here you should see per child entry a line like

$RetMsg = str_replace("<TableName>", "CHILDTABLENAME", $RetMsg);

change the CHILDTABLENAME to the respective information you want to display.

!! This file will be overwritten if you regenerate your project.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

SkayyHH
Veteran Member
Posts: 425
Joined: 2015-04-27 21:18

Re: Could not delete the record Message

Post by SkayyHH » 2022-09-12 21:45

Thanks so much! Do you know PowerGreb? It is a great search and replace in files tool. A lifesaver when appgini overwrites the files again. :-)

Post Reply