Support > Repository > Parent-child relationship > Setting related to cooperation
ja | en

We introduce the option to set on the child model side.

Child models on the parent model details screen are stored in tabs by default.You can also display child models side by side rather than tabs. For details, "Link multiple children to one parent" Child model display layout change (tab display and list display)Please read.

An example of changing the list display name of the child model to "customer-specific support history list" is shown below.

Figure 6 Changing the list display name

Definition method

Set up the support model "Search/list display> foreign key linkage> list name".

Figure 7 Setting the list name

An example in which the maximum number of items displayed in the child model is set to 1 is shown below.

Fig. 8 Set the maximum number of display items of the child model as 1

Data that was not displayed can be checked on the search screen of the support model.

Figure 9 Checking other data on the support model search screen

Definition method

Set up "support/list display> external key cooperation> maximum display number" of the support model.In this example it is "1".

Figure 10 Setting the maximum number of displayed items

Figure 11 shows an example of adding explanatory text to Figure 8.

Fig. 11 Add descriptive text to the child model list display

Definition method

Set up "support/list display> external key cooperation> explanation" of the support model.At the same time, you can specify the style.

Figure 12 Specifying descriptions and styles

Create a new child model

To create a child model in external key cooperation, you can use the "Create New" button displayed on the detail display screen of the parent model.I will explain how to not display this button.

Figure 13 Example in which the new creation button is not displayed

Disable the support model "new registration> external key cooperation> new registration button to be displayed on the parent model's detailed display screen".(It is enabled by default.)

Figure 14 Setting the new registration button to be displayed on the detailed display screen of the parent model

Button names and display conditions can also be set.Detail is"Screen function> Customize button name and display conditionIt explains with.

List display on the parent model/Detailed display

It is possible not to display the button which transitions to the list display/detail screen of the parent model prepared on the detail screen of the child model.

Figure 15 Example in which the transition button to the parent model is not displayed

Disable the support model's "Detailed display> Foreign key cooperation> Parent model list display button" and "Detailed display> Foreign key cooperation> Parent model detail display button".(It is enabled by default.)

Figure 16 Setting the list display button and detail display button of the parent model

Button names and display conditions can also be set.Detail is"Screen function> Customize button name and display conditionIt explains with.

In addition to the settings shown in Figure 14 (hide the "Create New" button), you can also set not to display the child model list.As shown in Figure 17, the existence of parent-child model relationship can not be recognized from the screen.

Figure 17 Example in which the new creation button is not created and the child model list display is also not displayed

Definition method

>>Unlock the "Display" setting in the data list to be displayed on the parent model's detailed display screen.

Figure 18 Setting the data list to be displayed on the detailed display screen of the parent model

Button names and display conditions can also be set.Detail is"Screen function> Customize button name and display conditionIt explains with.

With foreign key relationships, when deleting parent model data, child models are also deleted at the same time. An example of deleting the parent model "customer" is shown in Fig. 19 and Fig.

Figure 19 Deleting customer data
Figure 20 Successful Deletion of Customer Data

We will confirm the support model here. You can see that the child model (support) has also been deleted.

Figure 21 Child model "Support" has also been deleted at the same time

Definition method

"Other> Relationships of the model> Automatically delete when deleting the parent model" is confirmed.It is enabled by default.If you cancel this setting, the child model will remain even if you delete the data of the parent model.(However, in this case, the state that parent tied data does not exist.)

Figure 22 Setting to delete automatically when parent model is deleted
With parent - child - grandchild relationship, all descendants associated with it are deleted when parent is deleted.

With the timing of registration, update and deletion of the child model, it is possible to recalculate and resave the item values ​​of the parent model side.

Figure 23 shows an example of managing the number of support as child models by customers who are parent models.

Figure 23 Adding support items

If you add support, the value of "Support cases" will also increase.At the time of this registration, update and deletion, the item values ​​on the parent model side are recalculated and re-saved.

Figure 24 Support Count Item recalculated

Definition method

Add "support count" item to parent customer model.It saves it in the database, and the formula uses the COUNT function.

COUNT(${support_lp})
Figure 25 Definition of number of support items

Support modelEnable "Updating parent model when changing> Screen> Other>".(By default, this value is enabled.)

Figure 26 Setting to update parent model when changing

This setting works because the "number of support cases" item is saved in the database.Calculation is executed regardless of this setting, because it is always recalculated at the time of display in case of non-database saving.

This setting is recalculated retroactively to the ancestor if the parent is further daisy. The "brother" data of the child data linked to the parent is not subject to recalculation.
This process is not performed when registering/updating with a child model alone.For example, when registering a child model by receiving mail, the parent model is not recalculated.

At the timing of registration, update and deletion of the parent model, it is possible to recalculate and resave the item values ​​on the child model side.

The child recalculation function becomes effective when the following conditions are satisfied.

  • A list update screen of child models has been created.
  • Simultaneous updating function of foreign key is enabled in list update of child model.

For details of the setting method, see "Simultaneous update of child modelsPlease read.