# Related Record Configurations (QMS)

The Create Related Record action allows Quality Admins to automate creation of related records based on the lifecycle progress of another record, and to automatically transfer some data from the source record to the new record. This can streamline events which occur in your business processes where users would otherwise be required to manually create related records and populate them with data.

## Example Use Case: Issue Escalation from an External Audit

Suppose that in your business processes, during the course of an _External Audit_ lifecycle, certain events may cause the user or users performing tasks within the _External Audit_ to need to create an _Issue Escalation_ with required field information, including _Title_, _Source_, _Description_, and _Date of Occurence_, sourced from the parent _External Audit_.

While you could have users manually create such a record from an _Issue Escalation_ related record section on the _External Audit_ record details page, such a process can cause duplicate work, as some of the required field data to create the _Issue Escalation_ may already exist on the parent _External Audit_.

To automate this process and reduce unnecessary manual record creation and data entry, you could create a _Related Record Configuration_ which maps _Title_, _Source_, _Description_, and _Date of Occurrence_ field data on the _Issue Escalation_ object to transfer from the appropriate fields on the _External Audit_ object. The _Related Record Configuration_ also links a reference field on the _Issue Escalation_ object back to the parent _External Audit_.

You could then add the **Create Related Record** action to an appropriate state, such as _Escalation Required_, on the _External Audit_ object lifecycle, so that when an event causes the _External Audit_ record to enter that state, Vault automatically creates an _Issue Escalation_ record and populates its required fields.

## Configuration Overview

To integrate related record creation into your processes, you must set up the following configuration components:

* [Create][1] _Related Record Configurations_ to suit your processes.
* [Add][2] the **Create Related Record** action as an entry or user action on an object lifecycle state, selecting at least one _Related Record Configuration_.

## Creating Related Record Configurations {#creating-rel-rec-configs}

The **Create Related Record** action relies on defined object type and field mappings to create records. Those mappings are stored in Vault as _Related Record Configurations_. To create a _Related Record Configuration_:

1. Navigate to **Admin > Configuration > Related Record Configurations**.
2. Click **Create**.
3. Fill in a _Label_ and _Status_ value.
4. Select a **Source Object** and a **Source Object Type**. This object is the parent object whose lifecycle will trigger the related record creation and from which you want to copy field values. Some objects and object types are not available for selection, see the [limitations][3] section for details.
5. Select a **Related Object**. Records of this object will be created by the **Create Related Record** action. Some object types are not available for selection; see the [limitations][3] section for details.
6. Select an **Outbound Reference Field**. This field, on the object selected in the _Related Object_ drop-down, references back to the parent object.
7. In the _Field Value Mappings_ section, select fields in the _Value_ column to derive values from for each required field on the related object.
8. Optional: In the _Include Reference Records_ section, select **Add Record** and choose a _Source-Reference_ object to copy any related reference object records to a _Target-Reference_ object.
9. Click **Add Mapped Value** to add mappings for optional fields. You can remove mappings by clicking the minus (-) icon.
10. Optional: Select the **Copy Attachments** checkbox to copy attachments from the source object record to the target object record. If selected, Vault only copies attachments if both the source and target objects have <a href="/en/gr/15057/#customizestandardobjects">attachments enabled</a>.
11. Click **Save**.

## Configuring the Create Related Record Action {#create-related-record-action}

Add the **Create Related Record** action to the object lifecycle state in which record creation should trigger. When configuring this action, you must select at least one _Related Record Configuration_ in the **Create Related Record Configurations** box. While you can select multiple _Related Record Configurations_, we recommend using _Perform with conditions_ and only a single _Related Record Configuration_ to finely control the circumstances in which to trigger the record's creation.

## Best Practices for Related Record Automation

* Field data transfer using this feature is intended as a supplement to field-defaulting configurations, together forming the basis of required data in the new related record.
* While you can configure multiple instances of the action to create more than one related record at a time, this can increase the complexity of your configuration and can impact the time it takes for Vault to create the related records.
* For automatic creation of _Effectiveness Check_ records specifically, consider using the **Create Effectiveness Check** action, depending on the specifics of your use case.

## Limitations for Related Record Automation {#limitations}

* You can configure _Related Record Configurations_ for supported standard source objects or custom source objects only. Some standard and system Vault objects, such as _User_ or _Person_, cannot be targeted by a _Related Record Configuration_.
* **Create Related Record** is not supported as an event action.
* You cannot select an inactive object type as the _Source Object Type_ or _Related Object Type_.

## Quality Teams for Related Record Automation

The **Create Related Record** action does not directly modify security of the newly created action. It is recommended that you configure <a href="/en/gr/52842/">Quality Teams</a> to define role assignments on the newly created record, or leverage <a href="/en/gr/25494/">Custom</a> or <a href="/en/gr/36122/">Matching</a> Sharing Rules to ensure your newly created record is secured appropriately.

## Related Permissions

The _Security Profile: Admin: Create Related Record_ permission controls the ability to read, create, edit, or delete _Related Record Configurations_.

To copy related reference object records, users require _Read_ permission on the _Source_ join objects and _Create_ permission on the _Target_ and _Target_ join objects.

[1]: #creating-rel-rec-configs
[2]: #create-related-record-action
[3]: #limitations