# Defining Object Mappings & Field Mappings (Registration & Dossier Management)

[Registration & Dossier Management](/en/lr/71498/) allows you to create Object Mapping <a class="external-link " href="https://developer.veevavault.com/mdl/#vault-components" target="_blank" rel="noopener">MDL components<i class="fa fa-external-link" aria-hidden="true"></i></a> with Field Mapping subcomponents to automate field population of certain records and filter certain search results. You can map field values between a source and target object so that records created or populated from [supported actions][3] contain the same field values as related source records. You can [link an Object Mapping to a Relational Token][2] so that Vault populates mapped fields based on token resolution when a supported action runs. For example, you can map the _ID_ field on the _Claim_ object to an object reference field on the _EDL Item_ object, then link the mapping to a Relational Token. When users run the _Generate Requirements_ action on a _Registration Item_, Vault populates the object reference field on all generated _EDL Items_ with the same values in the _Claim_ source record based on token resolution.

You can map field values between the _Registration Item_ source to the _Registration_ target to include default filters in the _Search Registration_ dialog when users [select a _Registration_](/en/lr/76902/#select-registration) when conducting Local Impact Assessments.

You can also use MDL to create Object Mappings with Field Mappings. See [About RegulatoryOne Component Types](/en/lr/494967/) for more details.

## About Supported Actions {#actions}

The following actions populate records or filter search results based on Object Mappings:

* [**Generate Registration Data**](/en/lr/76906/#generate-registration-data): Populates mapped fields on _Registration Items_ with values from source _Registration Items_ based on how the [linked Relational Token][2] resolves.
* [**Local Impact Assessment**](/en/lr/76906/#object-mapping): Filters _Registration_ search results based on mapped _Registration Item_ values.
* [**Create Registration and Objective**](/en/lr/76906/#object-mapping): Filters _Registration_ search results based on mapped _Registration Item_ values.
* [**Create Registrations and Objectives**](/en/lr/76906/#object-mapping): Filters _Registration_ search results based on mapped _Registration Item_ values. 
* [**Generate Requirements**](/en/lr/71505/#generate-action): Populates mapped fields on generated _Requirements_, _EDLs_, and _EDL Items_ with values from source records based on the following factors:
  * Any Object Mappings you link to the action to [define default field values][7].
  * How the [linked Relational Token][2] resolves.
* [**Update Requirements**](/en/lr/71505/#update-action): Populates mapped fields on generated _Requirements_, _EDLs_, and _EDL Items_ with values from source records based on the following factors:
  * Any Object Mappings you link to the action to [define default field values][7].
  * How the [linked Relational Token][2] resolves.
* [**Populate Registration Record**](/en/lr/492747/#action-populate): Populates mapped fields on _Registrations_ with values from source _Registration Items_.
* [**Split Registration Items**](/en/lr/75233/#split-action): Populates mapped fields on generated _Registration Items_ with values from the source _Registration Item_ based on how the [linked Relational Token][2] resolves.

### Default Field Values for the Generate Requirements & Update Requirements Actions {#default-field-values}

When configuring the _Generate Requirements_ and _Update Requirements_ actions, you can link the action to Object Mappings to populate mapped fields on generated records with default field values on the source _Requirement Library_. For example, you can configure default field values to support [automatic document matching](/en/lr/33316/#automatic-document-matching).

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: If you’ve specified Field Mappings for any field linked to the action’s configuration and an Object Mapping <a href="#linking">linked to a Relational Token</a>, Vault populates the field based on token resolution and ignores the mappings you added to the action.</p>
    </div>
  </div>
</div>



## Creating Object Mappings & Field Mappings {#creating}

You must first create an Object Mapping that identifies the source and target objects. Then you can create Field Mappings for that Object Mapping that map specific fields on those objects. When users run [supported actions][3], Vault populates the fields in target object records with the same value as the source record or to include default filters in the _Search Registration_ dialog for Local Impact Assessments. Some supported actions require you to [link the Object Mapping to a Relational Token][2] in order for Vault to populate fields based on token resolution.

All objects and fields referenced in Object Mappings and Field Mappings must be active. When entering specific object field names, you must enter the values in "Field.[field_name__v]" format. For example, `Field.name__v`.

You can map multiple fields between two (2) objects but can only map fields of the same data type with the same [attributes](/en/lr/15057/#customizestandardobjects). For example, you can map a text type to a text type or a number type to a number type but cannot map a text type to a number type. Similarly, you cannot map two (2) number fields with different configured attributes, such as different _Minimum_ values. Field Mappings do not support icon or link types of formula fields, nor object fields that reference fields on the _Document_ object. If you link a [supported action][3] to an Object Mapping with unsupported fields, the action will fail when run by a user.

To create an Object Mapping with Field Mappings:

1. Navigate to **Admin > Configuration > Object Mapping**.
2. On the _All Object Mappings_ page, click **Create**.
3. Enter a unique **Name**. Vault automatically adds the `__c` suffix to the _Name_ you enter.
4. Enter a unique **Label**. This field does not support spaces.
5. Select a **Source Object**. To use this Object Mapping to [populate _Registration_ fields](/en/lr/492747/) or filter assessment results, you must select the **Registration Item** object.
6. Select a **Target Object**. To use this Object Mapping to [populate _Registration_ fields](/en/lr/492747/) or filter assessment results, you must select the **Registration** object. To link this Object Mapping to a Relational Token, you must select the applicable [supported object][4].
7. Specify if the Object Mapping is **Active**. If you select **No**, Vault ignores the inactive Object Mapping when [supported actions][3] run.
8. Click **Save** to create the Object Mapping and reveal the _Field Mappings_ section.
9. Expand the _Field Mapping_ section and click **Create**.
10. In the _Create Field Mapping_ dialog, enter a unique **Name**.
11. Select the same **Source Object** you selected for the Object Mapping.
12. Select the same **Target Object** you selected for the Object Mapping.
13. Enter the name of a **Source Field**.
14. Enter the name of an active **Target Field** of the same type and with the same configured field attributes as the _Source Field_. 
    * If you entered `Field.ID` as the _Source Field_, you must enter a field in the _Target Object_ that references the _Source Object_.
    * If you're mapping [document reference fields](/en/lr/35045/), ensure the _Document Version Reference_ on the source and target fields is _Latest Steady State_ version.
15. Specify if the Field Mapping is **Active**. If you select **No**, Vault ignores the inactive Field Mapping when [supported actions][3] run.
16. Click **Save**.
17. Optional: Click **Create** to add additional Field Mappings to this Object Mapping.

 <div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: If any of the Field Mappings of an Object Mapping linked to a Relational Token referenced in a <a href="/en/lr/75233/#create"><em>Spit Rule</em></a> are the same as any of the <em>Fields to Inherit</em> on the <em>Split Rule</em>, Vault will display an error to users when they select that rule on a <em>Registration Item</em> and run the <em>Split Registration Items</em> action.</p>
    </div>
  </div>
</div>



## Editing Object Mappings & Field Mappings {#editing}

To edit an Object Mapping or Field Mapping:

1. Navigate to the relevant Object Mapping.
2. Optional: Modify the Object Mapping:
    1. From the **All Actions** menu, select **Edit**.
    2. Make the applicable changes.
    3. Click **Save**.
3. Optional: Modify a Field Mapping:
    1. Expand the _Field Mappings_ section.
    2. Click on the name of the relevant Field Mapping.
    3. From the **All Actions** menu, select **Edit**.
    4. Make the applicable changes.
    5. Click **Save**.

## Deleting Object Mappings & Field Mappings {#deleting}

To delete an Object Mapping or Field Mapping, navigate to the applicable Object Mapping or Field Mapping and select **Delete** from the **All Actions** menu. Then, click **Continue** to proceed with the deletion.

## Linking Object Mappings to Relational Tokens {#linking}

You can link Object Mappings to Relational Tokens so that when users run [actions that support Relational Tokens][6], Vault populates mapped fields on target records with values from source records based on how the token resolves in [supported object records][4] and [MDL components][5]. See [Defining Relational Tokens](/en/lr/71507/#object-mappings) for more details about how to link an Object Mapping to a Relational Token.

### Supported Actions {#token-actions}

The following actions support Relational Tokens linked to Object Mappings and populate mapped fields based on token resolution:

* [_Generate Registration Data_](/en/lr/76906/#generate-registration-data)
* [_Generate Requirements_](/en/lr/71505/#generate-action)
* [_Update Requirements_](/en/lr/71505/#update-action)
* [_Split Registration Items_](/en/lr/75233/#split-action)

### Supported Objects {#objects}

To link an Object Mapping to a Relational Token to populate mapped fields based on token resolution, you must specify a _Source Object_ that matches the linked Relational Token's _Object_. Relational Tokens support Object Mappings for the following _Target Objects_:

1. _Registration Item_
2. _Requirement_
3. _EDL_
4. _EDL Item_

### Supported Component Types {#components}

To link an Object Mapping to a Relational Token to use in a Registration Attribute MDL component to support [generating registration data](/en/lr/76906/#generate-registration-data) for Local Impact Assessments, the _Source Object_ must match the token's _Object_ and the _Target Object_ must be _Registration Item_. See [Defining Registration Attributes](/en/lr/761426/) for more details.

## Related Permissions {#permissions}

You can complete all the steps in this article with the standard _System Administrator_ or _Vault Owner_ security profile. If your Vault uses custom security profiles, your profile must grant the following [permissions](/en/lr/22824/):

<table>
  <tr>
    <th><strong>Type</strong></th>
    <th><strong>Permission</strong></th>
    <th><strong>Controls</strong></th>
  </tr>
  <tr>
    <td>Security Profile</td>
    <td>Admin: Configuration: Configuration: All Configuration</td>
    <td>Ability to create and modify Object Mappings and Field Mappings.</td>
  </tr>
  <tr>
    <tr>
    <td>Security Profile</td>
    <td>Application: Vault Actions: API: Metadata API</td>
    <td>Ability to access the <em>All Object Mappings</em> page from the <em>Application Configurations</em> section of the <em>Configurations</em> page.</td>
  </tr>
  <tr>
    <td>Security Profile</td>
    <td>Objects: All Objects: Object Permissions: Create, Edit</td>
    <td>Ability to create and modify Object Mappings and Field Mappings.</td>
  </tr>
  <tr>
    <td>Security Profile</td>
    <td>Pages: All Pages: Object Mapping Details: View</td>
    <td>Ability to view the <em>Details</em> and <em>Fieldmappings</em> for individual Object Mappings.</td>
  </tr>
    <td>Security Profile</td>
    <td>Pages: All Pages: Object Mapping List: View</td>
    <td>Ability to view the list of Object Mappings on the <em>All Object Mappings</em> page.</td>
  </tr>
</table>

[1]: #permissions
[2]: #linking
[3]: #actions
[4]: #objects
[5]: #components
[6]: #token-actions
[7]: #default-field-values