# About System-Managed Object Record Names

You can configure Vault to automatically populate the standard `name__v` field on any custom object.

## How to Configure System-Managed Object Record Names

To configure system-managed object record names:

  1. From **Admin** > **Configuration** > **Objects**, create a new object or click into an existing one.
  2. Open the **Fields** tab, click into the `name__v` object field name, then click **Edit**.
  3. Select the **System manages field value (read-only)** checkbox. Note that this option is not available for standard objects.
  4. In the [**Value Format**][1] field, enter values to apply to the object records. You can also use the [token][2] tool to pick from a list of valid tokens to insert in the **Value Format** field, or enter a literal string. Vault supports tokens for _Text_, _Number_, and single value _Picklist_ object fields at this time.
  5. In the [**Starting Number**][3] field, enter a starting number for the sequence.
  6. Click **Save**.

When users create new records for the object, Vault will automatically populate the object record name according to the configuration settings. These will be read-only (non-editable), and will not change after initial record creation. Existing object records will retain their original `name__v` values. You cannot use an object's own system-managed name in formula expressions for <a href="/en/gr/42778/">object field defaults</a> and <a href="/en/gr/46866/">validation rules</a>.

<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>: We do not recommend turning system-managed names off and on again once Vault begins naming records. This can lead to naming conflicts and undesired numbering.</p>
    </div>
  </div>
</div>



## About Value Formats {#about-value-formats}

The **Value Format** setting allows you to define how the object records will be named. The default value format is set to VV-{######}. This format can be modified according to the settings below.

  * You can place literal strings, such as _VV_ or _UU_, before (prefix) or after (suffix) the sequence number placeholder {###}.
  * Field tokens from the same object use the format `{fieldname__v}` and `{fieldname__c}`. The token uses the name (not label) of the object field. For example, `{status__v}` inserts the _Status_ value for the record name from the same object.
  * Field tokens from outbound relationship (parent and reference) fields use the format `{parent__cr.name__v}`. Here, `parent__cr` represents the relationship name and `name__v` represents the name field on the related object.
  * You can put a sequence number token using {####}. Each "#" sign in the sequence number placeholder indicates a "0" value padding of the sequence number.
  * The maximum length is 128 characters.

<table class="wbord">
  <tr>
    <td>
      <p>
        Value Format
      </p>
    </td>
    <td>
      <p>
        Starting Number
      </p>
    </td>
    <td>
      <p>
        1st Object Record
      </p>
    </td>
    <td>
      <p>
        2nd Object Record
      </p>
    </td>
    <td>
      <p>
        3rd Object Record
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        VV-{#}
      </p>
    </td>
    <td>
      <p>
        1
      </p>
    </td>
    <td>
      <p>
        VV-1
      </p>
    </td>
    <td>
      <p>
        VV-2
      </p>
    </td>
    <td>
      <p>
        VV-3
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        VV-{######}
      </p>
    </td>
    <td>
      <p>
        10
      </p>
    </td>
    <td>
      <p>
        VV-000010
      </p>
    </td>
    <td>
      <p>
        VV-000011
      </p>
    </td>
    <td>
      <p>
        VV-000012
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Product-{####}
      </p>
    </td>
    <td>
      <p>
        100
      </p>
    </td>
    <td>
      <p>
        Product-0100
      </p>
    </td>
    <td>
      <p>
        Product-0101
      </p>
    </td>
    <td>
      <p>
        Product-0102
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        Study-{####}-CC
      </p>
    </td>
    <td>
      <p>
        1000
      </p>
    </td>
    <td>
      <p>
        Study-1000-CC
      </p>
    </td>
    <td>
      <p>
        Study-1001-CC
      </p>
    </td>
    <td>
      <p>
        Study-1002-CC
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        VV-{###}-{status__v}-{products__cr.name__v}
      </p>
    </td>
    <td>
      <p>
        001
      </p>
    </td>
    <td>
      <p>
        VV-001-Active-Cholecap
      </p>
    </td>
    <td>
      <p>
        VV-002-ActiveCholecap
      </p>
    </td>
    <td>
      <p>
        VV-003-Active-Cholecap
      </p>
    </td>
  </tr>
  <tr>
    <td>
      <p>
        {product__v.name__v}-{country__v.name__v}-{####}
      </p>
    </td>
    <td>
      <p>
        0001
      </p>
    </td>
    <td>
      <p>
        Cholecap-Japan-0001
      </p>
    </td>
    <td>
      <p>
        Cholecap-Japan-0002
      </p>
    </td>
    <td>
      <p>
        Cholecap-Japan-0003
      </p>
    </td>
  </tr>
</table>

<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>: When using a system-managed <code class="language-plaintext highlighter-rouge">name__v</code> object field, you cannot use formula fields in Value Formats.</p>
    </div>
  </div>
</div>



## Using Tokens {#using_tokens}

The token selector allows you to use field tokens to automatically set object record names. You can select field tokens from the same object or from objects with outbound relationships. Additionally, you can enter a name expression in the **Value Format** field using the same format settings listed [above][1]. Vault supports tokens for _Text_, _Number_, and single value _Picklist_ object fields at this time.

Note that Vault doesn't update system-managed names when there are updates to fields referenced by tokens.

## About Starting Numbers {#about-starting-numbers}

The **Starting Number** setting allows you to define the value of the first object record created. You can enter any non-zero, positive integer up to 32 characters in length. The default starting number is 1. Once implemented, Vault maintains a sequence number counter and increments the value on each subsequent new record.

If system-managed names have been implemented previously and you edit the starting number value:

  * The new starting number must be greater than the current value displayed. Vault displays the next available number.
  * When selecting higher values than the current value displayed, the existing unfilled values will not be populated. The next object record created will start from the new number specified in the sequence.
  * Upon saving, Vault will check to see if the value is valid (higher than previous existing values on the object) and will return an error message if invalid.

If you change these values, Vault applies the new values to all new object records created after the change. Existing object records will retain their original values.

<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>: We recommend never changing the starting number if the object has existing records. Once you change the starting number for an object, you can never undo your change. All <em>Value Formats</em> for that object will use the new starting number after you save your change.</p>
    </div>
  </div>
</div>



## Creating or Editing Object Records with System-Managed Names

When creating or editing object records for objects in which the name is system-managed, the _Name_ field is read-only (non-editable). Upon saving the new object records, Vault displays the system-managed name.

## Vault Behavior for Consecutive Number Values {#consecutive-number-value-behavior}

Sequentially increasing number values are guaranteed, but not consecutive number values. Object records created consecutively may not have consecutively numbered system-managed names if one or more of the records isn't saved due to an error. 

Becauce Vault automatically assigns number values at the start of a transaction, if the transaction fails, the assigned number is discarded and not reused for the next object record. This allows Vault to support high-volume, concurrent operations without locking the system for other users. While this prioritizes performance and sequentially increasing numbers, it means that configuration errors causing repetitive failures will result in non-consecutive record numbers.

 [1]: #about-value-formats
 [2]: #using_tokens
 [3]: #about-starting-numbers
