Versioning Custom Objects

Note:

Destination version objects do not inherit Shield Platform Encryption from original source objects. If you are capturing encrypted fields on the original source object, when encryption is required on the destination version object's equivalent field, configure the version field to use Shield Platform Encryption.

You need to create a new version item object and fields for mapping purposes for each object you want to version. This includes standard and custom objects not included in the Standard capture configuration. During versioning, objects and fields are copied from an originating source object to a destination object. For more information about mapping, see Capture Configuration Fields.

You can also modify the fields on an object captured by the standard capture configuration described in Viewing the Standard Comparison Overview. To modify the fields on a standard object, see Adding Fields to Capture From Originating Object to Versioning Object.

Note:

You must have all permissions to modify sObjects.

Creating a New Version Item Object for Mapping

To set up a mapping relationship between original source objects and fields and destination version objects and fields, you need to create a new version item object.

To create a new version item object:

  1. Click Setup | Create | Objects.
    You might see various version objects that look up to a master version object. Note the source objects and fields that you want to version, the labels, and the corresponding data type.
  2. Click New Custom Object to create your version item object.
  3. Complete the fields as described in "Fields for Defining Custom Objects" in the Salesforce Help.
  4. Click Save.

Adding a New Master Version Lookup Field

To define the lookup of the version item object to the master version object, after you have created your new version item object, create a new master version lookup field.

To add a new master version lookup field:

  1. On the newly created custom object, click Custom Fields & Relationships | New.
  2. Select Master-Detail Relationship as your field type, and click Next.
  3. Select Version as your master related object, and click Next.
  4. Add a distinctive field name and label for the new relationship, and click Next.
  5. Add the appropriate sharing and security settings for your new field, and click Next.
  6. Add the new custom field to your page layouts, and click Next.
  7. Add any custom related lists.
  8. Click Save.

Adding a New Original Id Field

To store the record ID of the original record, add an Original Id field to your version item object. The Original Id field on the destination object stores the record ID of the original record to track a record between different versions.

To add a new Original Id field:

  1. On the custom object, click Custom Fields & Relationships | New.
  2. Select the Text field type, and click Next.
  3. Type a name in the Field Label and Field Name fields. For example, OriginalId.
  4. Click Next.
  5. Add the appropriate sharing and security settings for your new field, and click Next.
  6. Add the new custom field to your page layouts.
  7. Click Save.

Adding Fields to Capture From Originating Object to Versioning Object

Add the additional fields to the version object that you want to capture. Ensure the fields have a data type that matches the data type in the originating object fields.

To add all of the fields that you want to capture:

  1. On the custom object, click Custom Fields & Relationships | New.
  2. Add the field types you require as previously described.