Trigger and Target Info Areas when Updating, Displaying or Deleting Records
Triggers with the Edit/update, Show or Delete actions access the database.
These actions are carried out for all possible records. For example, if you apply changes to a dependent info area from a parent info area, the changes are applied to all dependent records that meet the defined conditions.
Default options:
- Trigger info area = target info area: The changes are applied to the record from which the trigger was initiated.
- Trigger info area is a parent of the target info area: The changes are applied to all dependent records, irrespective of whether they are directly or indirectly dependent on the trigger info area.
- Target info area is a parent of the trigger info area: The changes are applied to the parent record, irrespective of whether the trigger info area is directly or indirectly dependent on the target info area.
Special cases:
|
Trigger Info Area |
Target Info Area |
Changes to records |
|---|---|---|
|
Company or Person in Company |
Dependent on Person in Company or Company |
Dependent on the same company (if Data > Company-Related is selected) or person |
|
Dependent on Company or Person in Company, only company-dependent |
Dependent on Person in Company or Company |
Dependent on the company (only company-dependent) |
|
Company or Person in Company, only company-dependent |
Person in Company |
All persons within the company |
|
Dependent on Person in Company or Company |
Only company-dependent |
All for this company |
You can change the default index relationship between the trigger and target info areas (Index Relationship column in the access rights, see Defining Database Events). For example, if you wish to apply changes to the Company info area from the Relationship info area, by default, the trigger would apply to the parent company. If you select FI_1_StaNo, FI_1_SerNo -> FI_StaNo, FI_SerNo as the index relationship, the trigger affects the target company.
You cannot edit, delete or display records in independent info areas from other independent info areas. Consequently, you cannot apply changes to the Document info area from the Company info area.
Example: Updates Between Info Areas
The trigger in the following examples applies the following changes:
Company >
- Ext. Company Key (1:n)
- Person in Company (1:n) > Activity (1:n)
- Activity (1:n)
Key:
|
Person in Company |
Activity |
Ext. Company Key |
|---|---|---|
|
FI_StaNo. |
FI_StaNo. |
FI_StaNo |
|
FI_SerNo |
FI_SerNo |
FI_SerNo |
|
KP_StaNo |
KP_StaNo |
Ext. System |
|
KP_SerNo |
KP_SerNo |
Ext. Key |
|
Date |
||
|
MA_SerNo |
- If you want to apply changes to the Activity info area from the Person in Company info area, only activities associated with this person can be changed. Conversely, you can only apply changes to the person from person-dependent activity records, not from company-dependent ones.
- You can apply changes to external company keys, despite these being company-dependent and not person-dependent. Conversely, you can make changes to all persons and company-dependent records from the Ext. Company Key info area.