The Delete Detail Records server behavior allows the developer delete all detail records depending on the one used in the transaction. This implements a cascaded delete of all detail records of the master record being used in the transaction's main operation.
To add a Delete Detail Records trigger into the page, you must follow the next steps:
The purpose of this user interface tab is to allow the developer set
up the delete operation options:

To set the dialog box options, follow the next steps:
In the Transaction table drop-down menu, the table used in the delete/custom transaction on page is automatically selected and the drop-down menu is disabled.
In the Primary key drop-down menu select the table column containing the primary key of the transaction table.
In the Detail table drop-down menu select the table which acts as a detail table for the transaction table. This means that its fields are related to the transaction table through a field.
In the Detail foreign key drop-down menu, select the detail table column that stores the relation to the master table.
The three buttons in the top right corner of the
interface offer you the next functionalities:
· Click OK when you are done configuring the trigger.
· Click Cancel to exit without applying the new settings.
· The Help button opens this help page.
These buttons are common to both tabs of the Delete
Detail Records
The purpose of this user interface tab is to allow the removal of files that are associated to the detail records. This means that if the master record has entries in the detail table, and those have files attached (e.g. departments -> employees -> employee portrait ) you can set the trigger to also delete the files.
Note: This tab is only available in MX Kollection Professional.

To set the dialog box options, follow the next steps:
In the File(s) grid you can add rules for detail files to be deleted. To add a new rule click the Plus (+) button and fill in the options below the grid. To remove a rule select it and then click the Minus (-) button.
In the File name field enter the rule on which the file name is computed. It can be the name stored in the detail table, or a rename rule that you used on upload. You can use InterAKT Dynamic Data to select dynamic values from fields in the current transaction, recordsets in the page or detail table fields.
In the Location field enter the name of the folder where the files are stored. You can use the Browse button to pick the folder, and it will be added relative to the current page.
The purpose of this user interface tab is to allow the removal of folders that are associated to the detail records. This means that if the master record has entries in the detail table, and those have folders attached (e.g. departments -> employees -> employee data in a certain folder ) you can set the trigger to also delete the entire folder associated with the detail record.
Note: This tab is only available in MX Kollection Professional.

To set the dialog box options, follow the next steps:
In the Folder(s) grid add rules for folders associated with the detail record that must be deleted. To add a new rule click the Plus (+) button and fill in the options below the grid. To remove a rule select it and then click the Minus (-) button.
In the Folder field enter the name of the base folder where the folder to be deleted exists. You can use the Browse button to pick the folder, and it will be added relative to the current page.
In the Subfolder drop-down menu select one of the transaction fields that gives the name of the folder to remove, or if you have a custom naming, select the None: Rename Rule option.
In the Naming rule text field enter the rule to compute the folder name on. You can also add other dynamic or static subfolders, as you can see in the image above. To add dynamic data you can directly enter InterAKT Mark-up, or use the InterAKT Dynamic Data icon to visually select it.
In the Location field enter the name of the folder where the record specific folders exist. You can use the Browse button to pick the folder, and it will be added relative to the current page.
The purpose of this user interface tab is to allow the developer to
change the default trigger properties, to suit the particular situation.
All trigger properties (name, type, priority, transactions) can be set
from this dialog box:

For instructions on completing this step, see the Advanced tab. For the Delete Detail Records trigger, by default the Priority is set to 99 and the Type is BEFORE, as it should execute before the transaction takes place.
The server behavior added this way can be edited later by double-clicking
its name in the Server Behaviors tab of
the Application panel.