Differences

This shows you the differences between two versions of the page.

Link to this comparison view

action type - delete relationships [2016/09/14 14:19] (current)
Line 1: Line 1:
 +~~NOTOC~~
 +====== Delete Relationships ======
 +Delete Relationship Actions are used to delete or recycle existing [[Relationship Record|Relationship Records]] from one [[Record]] to another in whichever [[Relationship Table|Relationship Table]] is specified.
 +===== Explanation =====
 +Delete relationship actions are used whenever a relationship record should be deleted or recycled automatically. ​ This is the only way to delete relationship records. ​ A deleted relationship record is removed completely from the application'​s database and this operation cannot be reversed whereas a recycled relationship record is un-touched except that it's active field is changed to reflect a recycled status. ​ This means that it will not appear in [[Query Builder|queries]] that involve the relationship record'​s table. ​ Recycled relationship records can be restored.
  
 +Actions can be attached to a delete relationship action on either the green global [[Automation Trigger|automation trigger]] or the yellow local trigger. Actions on the global trigger will run anytime a relationship record is updated in this relationship table throughout the application,​ so [[Action Type - Record Operation|an evaluation]] is necessary to ensure that it's only triggered on delete or recycle operations. Actions on the local trigger will run during this delete relationship action only, so no evaluation is required. These actions trigger on the relationship record itself; the builder has the opportunity to retrieve data from the record on either side of the relationship record or the relationship record itself during these Actions. These triggers fire before the relationship record(s) are deleted or recycled to ensure the data is still available for the actions to reference.
 +
 +{{ ::​action_delete_relation_drop.png?​direct&​600 |}}
 +
 +Example: The most common use of delete relationship actions is on a [[Field Type - Link|link field]] in the mass action area of a [[Form Type - List|list]] on a record'​s view page.  Suppose, on a [[Form Type - Page|page]] about an Account, there is a list of related Contacts. ​ A builder might create a "​Remove Relation"​ link in the mass action area of the list.  To make this button function properly, edit the actions for the "​Remove Relation"​ button, attach a delete relation action to the "Link is Clicked"​ automation trigger. ​ Leave the [[Context|context]] of the first map inherited, set the second to start from the page items, and then select the Contact to Account relationship table.
 +===== Settings =====
 +==== Specify Records to un-relate from each other ====
 +When this action runs, it will delete/​recycle relationship records between all possible combinations of the records from the first query and the records from the second query in the specified relationship table.
 +
 +{{ :​action_delete_relation_queries.png?​ |}}
 +==== Specify Relationship Table ====
 +Select which relationship table to delete/​recycle relationship records between the records found by the two queries above.
 +
 +{{ :​action_delete_relation_table.png?​ |}}
 +==== Delete or Recycle Relationship Records? ====
 +Choose whether to delete or recycle the relationship records found.
 +==== Disable associated Relationship Actions ====
 +Check this box to disable all actions associated with the relationship table the relationship is getting deleted/​recycled in. Actions locally associated with this delete relationship action will still run.
 +
 +==== Describe this action ====
 +Useful as a comment, this description will overwrite the automatically generated description in the [[Action Manager|Action Manager]].
 +==== Queue this action and children ====
 +When an action is [[Action Queue|queued]],​ the subsequent actions continue to process without it. Meanwhile, the queued action and its children process separately. Queue actions that you don't want a user to wait for.
action type - delete relationships.txt ยท Last modified: 2016/09/14 14:19 (external edit)
Copyright WorkXpress, 2019