---
schema_version: "1"
id: 78cf48779a0e9631aa523274ae3c48224fce787d3b73acf275587c12e137f238
title: System Fields
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/system_fields.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/system_fields.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: c992e88b892df176c4f0aa0b612d2f3f17a3681b5634b038d2e6a120f4ddce6f
description: System fields are read-only fields found on most objects. These fields are automatically updated during API operations. For example, the ID field is automatically generated during a create operation and the LastModifiedDate is automatically updated when a user modifies a record.
---
# System Fields

System fields are read-only fields found on most objects. These fields are automatically updated during API operations. For example, the ID field is automatically generated during a create operation and the LastModifiedDate is automatically updated when a user modifies a record.

## Basic System Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d2264545e56">Field</th>

              <th class="featureTableHeader  " id="d2264545e59">Field Type</th>

              <th class="featureTableHeader  " id="d2264545e62">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d2264545e56" data-title="Field"><span class="keyword parmname">Id</span></td>

              <td class="entry" headers="d2264545e59" data-title="Field Type">ID</td>

              <td class="entry" headers="d2264545e62" data-title="Description">Globally unique string that identifies a record. For information on IDs, see
                <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/field_types.htm#i1435616" target="_blank" title="HTML (New Window)">ID Field Type</a>.
                Because this field exists in every object, it is not listed in the field table for
                each object. <span class="keyword parmname">Id</span> fields have Defaulted on create and Filter
                access.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d2264545e56" data-title="Field"><span class="keyword parmname" id="SystemFields_IsDeleted"><a name="SystemFields_IsDeleted"><!-- --></a>IsDeleted</span></td>

              <td class="entry" headers="d2264545e59" data-title="Field Type">boolean</td>

              <td class="entry" headers="d2264545e62" data-title="Description">
                <span class="ph" id="IsDeleted_desc"><a name="IsDeleted_desc"><!-- --></a>Indicates whether the record has been moved to the
                  Recycle Bin (<samp class="codeph java">true</samp>) or not (<samp class="codeph java">false</samp>).</span>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d2264545e56" data-title="Field"><span class="keyword parmname">LastReferencedDate</span></td>

              <td class="entry" headers="d2264545e59" data-title="Field Type">dateTime</td>

              <td class="entry" headers="d2264545e62" data-title="Description">Date and time when the current user last viewed or modified this record, a
                record related to this record, or a list view. If this value is <samp class="codeph nolang">null</samp>, the current user has never viewed or modified a
                record related to this object. <p class="p">This field doesn’t exist on records for a custom
                  object unless a <a class="xref" href="https://help.salesforce.com/s/articleView?id=platform.creating_custom_object_tabs.htm&amp;type=5&amp;language=en_US" target="_blank" title="HTML (New Window)">custom object tab</a> is created for
                  that object. See <a class="xref" href="https://help.salesforce.com/s/articleView?id=000382652&amp;type=1&amp;language=en_US" target="_blank" title="HTML (New Window)">Use LastReferencedDate and
                    LastViewedDate fields in a SOQL query</a>.</p>
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d2264545e56" data-title="Field"><span class="keyword parmname">LastViewedDate</span></td>

              <td class="entry" headers="d2264545e59" data-title="Field Type">dateTime</td>

              <td class="entry" headers="d2264545e62" data-title="Description">Date and time when the current user last viewed or modified this record. If
                this value is <samp class="codeph apex_code"><span class="keyword">null</span></samp>, the current
                user has never viewed or modified this record.<p class="p">This field doesn’t exist on records
                  for a custom object unless a <a class="xref" href="https://help.salesforce.com/s/articleView?id=platform.creating_custom_object_tabs.htm&amp;type=5&amp;language=en_US" target="_blank" title="HTML (New Window)">custom object tab</a> is created for
                  that object. See <a class="xref" href="https://help.salesforce.com/s/articleView?id=000382652&amp;type=1&amp;language=en_US" target="_blank" title="HTML (New Window)">Use LastReferencedDate and
                    LastViewedDate fields in a SOQL query</a>.</p>
              </td>

            </tr>

          </tbody>

        </table>

## Audit System Fields

<table class="featureTable sort_table" summary="">



          <thead class="thead sorted" align="left">
            <tr>
              <th class="featureTableHeader  " id="d2264545e185">Field</th>

              <th class="featureTableHeader  " id="d2264545e188">Field Type</th>

              <th class="featureTableHeader  " id="d2264545e191">Description</th>

            </tr>

          </thead>

          <tbody class="tbody">
            <tr>
              <td class="entry" headers="d2264545e185" data-title="Field"><span class="keyword parmname">CreatedById</span></td>

              <td class="entry" headers="d2264545e188" data-title="Field Type">reference</td>

              <td class="entry" headers="d2264545e191" data-title="Description">ID of the <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/sforce_api_objects_user.htm" target="_blank" title="HTML (New Window)">User</a> who created
                this record. <span class="keyword parmname">CreatedById</span> fields have <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/access_for_fields.htm#i1435199" target="_blank" title="HTML (New Window)">Defaulted on create</a>
                and Filter access.</td>

            </tr>

            <tr>
              <td class="entry" headers="d2264545e185" data-title="Field"><span class="keyword parmname">CreatedDate</span></td>

              <td class="entry" headers="d2264545e188" data-title="Field Type">dateTime</td>

              <td class="entry" headers="d2264545e191" data-title="Description">Date and time when this record was created.
                <span class="keyword parmname">CreatedDate</span> fields have Defaulted on create and Filter
                access.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d2264545e185" data-title="Field"><span class="keyword parmname">LastModifiedById</span></td>

              <td class="entry" headers="d2264545e188" data-title="Field Type">reference</td>

              <td class="entry" headers="d2264545e191" data-title="Description">ID of the <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/sforce_api_objects_user.htm" target="_blank" title="HTML (New Window)">User</a> who last updated
                this record. <span class="keyword parmname">LastModifiedById</span> fields have <a class="xref" href="https://developer.salesforce.com/docs/atlas.en-us.264.0.object_reference.meta/object_reference/access_for_fields.htm#i1435199" target="_blank" title="HTML (New Window)">Defaulted on create</a>
                and Filter access.</td>

            </tr>

            <tr>
              <td class="entry" headers="d2264545e185" data-title="Field">
                <span class="keyword parmname">LastModifiedDate</span>
              </td>

              <td class="entry" headers="d2264545e188" data-title="Field Type">dateTime</td>

              <td class="entry" headers="d2264545e191" data-title="Description">Date and time when a user last modified this record.
                <span class="keyword parmname">LastModifiedDate</span> fields have Defaulted on create and Filter
                access.
              </td>

            </tr>

            <tr>
              <td class="entry" headers="d2264545e185" data-title="Field"><span class="keyword parmname">SystemModstamp</span></td>

              <td class="entry" headers="d2264545e188" data-title="Field Type">dateTime</td>

              <td class="entry" headers="d2264545e191" data-title="Description">Date and time when a user or automated process (such as a trigger) last
                modified this record. In this context, "trigger" refers to Salesforce code that
                runs to implement standard functionality, and not an Apex trigger.
                <span class="keyword parmname">SystemModstamp</span> fields have Defaulted on create and Filter
                access.<p class="p"> In general, <span class="keyword parmname">SystemModstamp</span> shows the date and time
                  when a user or automated process last modified the record. However, in certain
                  cases, <span class="keyword parmname">SystemModstamp</span> doesn’t capture every field change. For
                  example, if object A retrieves values from object B, then the changes to field
                  values in records on object B are reflected in the
                  <span class="keyword parmname">SystemModstamp</span> field for records on object B, but not on
                  object A.
                </p>
              </td>

            </tr>

          </tbody>

        </table>

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

Audit Fields with the dateTime field type have a certain range of valid dates. Unlike other dateTime fields, the earliest valid date is 1970-01-01T00:00:00Z GMT, or just after midnight on January 1, 1970. The latest valid date is 4000-12-31T00:00:00Z GMT, or just after midnight on December 31, 4000. These values are offset by your time zone. For example, in the Pacific time zone, the earliest valid date is 1969-12-31T16:00:00, or 4:00 PM on December 31, 1969.

If you import data into Salesforce and want to retain the audit field values of the source system, you can set the values for audit fields on the following objects: Account, ArticleVersion, Attachment, CampaignMember, Case, CaseComment, Contact, ContentVersion, Contract, Event, Idea, IdeaComment, Lead, Opportunity, Question, Task, Vote, and custom objects. The only audit field you cannot set a value for is systemModstamp.

## Create Audit Fields

1. From Setup, enter User Interface in the Quick Find box, then select **User Interface** under Customize.
2. Under Setup, select **Enable “Set Audit Fields upon Record Creation” and “Update Records with Inactive Owners” User Permissions**.
3. In the permission set or profile that you want to set audit fields with, enable the permission **Set Audit Fields upon Record Creation**.
4. Using the API, create a record and set its audit fields.

Not all standard objects have all audit fields. Check the Enterprise WSDL to verify which audit fields are available for a given object.

## Parent Reference Fields

If an object has a relationship to a parent object, two fields are added.

- Parent\_Name contains the object name of the parent. For example, Case has a Contact field that contains a reference to the contact parent of the case.
- Parent\_NameId contains the ID of the parent. For example, Case has a ContactId field that refers to the contact parent of the case. This field is used in SOQL relationship queries such as the following:
    
    SELECT Case.ContactId, Case.Contact.Name FROM Case

Even if the object can parent itself, these fields occur. For example, the Campaign object has a CampaignName and CampaignId field for referencing the parent Campaign.