Converting records

You can convert records of one type to another type, such as leads to accounts. A conversion map specifies how the fields in the source record map to those in the target. The source and target objects do not need to have exactly the same set of fields, but only values in the fields you map will be populated the new record.

You can create a conversion map in the source object definition or in the process of conversion when using the Convert menu action. To create triggers or workflows that convert objects, a conversion map must be present in the object definition.

Note: To enable Object Type Attribute for Data Maps, see Extending Object with Object Types.

You can only map a field to a field with a compatible type. Platform automatically suggests the mapping for fields with matching names, but you can change them. Fields with default values can be mapped. You can also map a field to a constant value such as a string, number, or particular record for lookups, or to an expression. Expressions may include server-side API calls or be simple formulas, such as {!total} - {!amount}, built from source field tokens. See Adding business logic for more information.

Picklist fields can be mapped and converted if the following are true:

  • The source and target objects have a picklist with the same set of values.
  • The source and target picklist items have the same integration codes.

The general steps for creating a conversion map include:

  1. Initiate conversion in the context of a record or the object definition of the type of record to convert.
  2. Choose the destination object type.

    The Conversion Map screen displays mappable source object fields. Read-only fields and template fields will not be available.

  3. From the menu next to each field, select the target field.
  4. Choose whether to delete the source object after record values have been converted to the target object type.

    Deleted source records will be moved to the Recycle Bin without deleting dependent records. This setting has no effect if a conversion map is used in workflow action or trigger.