Preserving Salesforce Record Audit Fields

    About Audit Fields

    Audit fields in Salesforce capture the dates of creation and modification of a record. They also record the user who created and last modified the record.

    Audit Field Examples:

    • CreatedByID
    • CreatedDate
    • LastModifiedbyID
    • LastModifiedDate

    By default, Audit Fields cannot be updated via API. This means when inserting data via API, the Date Audit Fields will be populated with the time of the job, and User Audit Fields will be updated with the user running the job.

    How Audit Fields affect Data Insertion

    There are scenarios where our features will insert data into your environment. For example, a restore job, seed job, or an unarchive job - are all activities that would create data in an environment. 

    How to Preserve Audit Field Values

    To preserve Audit Field values, you need to allow assigned users permission to insert values for the Audit Fields via API. To do this:

    1. In Settings, select User Interface from the tree menu on the left pane.  

    2. In the Setup section of the page, check the checkbox Enable “Set Audit Fields Upon Record Creation”.

    3. Assign the “Set Audit Fields Upon Record Creation” System Permission to a user via profile or permission set.
    NOTE:  If you have an automation that runs during record creation, it may update the audit fields after the records are created.

     

    « Previous ArticleNext Article »


    Contact Us

    Sometimes you just want to talk to someone. Our customer support team is available by phone:
    Request a Technical Support Call Back