Discussion:
[TYPO3-english] Extension: Automatically delete also the referenced records in BE?
christian ewigfrost
2017-11-17 13:20:09 UTC
Permalink
I think (hope) this is a very basic, easy to answer question:

In my extension i enable the backend user to create and delete records. Some of these classes define one or more of their properties through the uid of the record/object of another class (with 'type' => 'select' and access to a foreign table in the TCA files).
Deleting one of such records gives me the warning message:

"Are you sure you want to delete this record? "Test" [tx_icingaconfgen_domain_model_kunde:17] (There are 2 reference(s) to this record!)"

Is it possible delete the referenced records as well automatically?

And if so: Could i specifiy this only for certain classes?

Example:

I have a class called "host" and a class called "service"...

The class service defines a property called host via the uid of a specific "host" object. If i delete the specific "host" object/record i want all the service objects/records that reference this "host" object automatically.

BUT: If i delete a certain "service" object i don't want the "host" record to be deleted, just the "service" record.

I guess i could do this via the frontend, but i want this to be specifically possible via the backend. Is there a way to achive this?
Loading...