You are here:
Considerations for Converting the Field Type of a Custom Field
Before you convert a custom field from one type to another, review these considerations.
Considerations for Potential Data Loss from Converting a Custom Field's Type
- To avoid losing data, only convert custom fields that have no data to avoid losing data.
Changing the data type of an existing custom field can cause data loss in these situations.
- Changing to or from type Date or Date/Time
- Changing to Number from any other type
- Changing to Percent from any other type
- Changing to Currency from any other type
- Changing from Checkbox to any other type
- Changing from Picklist (Multi-Select) to any other type
- Changing to Picklist (Multi-Select) from any other type
Currently defined picklist values are retained when you change a picklist to a multi-select picklist. If records contain values that aren’t in the picklist definition, those values are deleted from those records when the data type changes.
- Changing from Auto Number to any other type
- Changing to Auto Number from any type except Text
- Changing from Text to Picklist
- Changing from Text Area (Long) to any type except Email, Phone, Text, Text Area, or URL
- If data is lost, any list view based on the custom field is deleted, and assignment and escalation rules can be affected.
Considerations for Changing a Custom Field's Data Type
- You can’t change the data type of any custom field that is mapped for lead conversion.
- If you change the data type of a custom field that’s set as an external ID, choosing a data type other than text, number, or email causes the field to no longer act as an external ID.
- The option to change the data type of a custom field isn’t available for all data types. For example, an existing custom field can’t be converted into an encrypted field nor can an encrypted field be converted into another data type.
- In Salesforce Knowledge article types, the file field type can’t be converted into other data types.
- You can’t change the data type of a custom field referenced by other items in Setup such as Visualforce pages, Apex code, processes, or flows.
- Before changing a custom field’s type, make sure that it isn’t the target of a workflow field update or referenced in a field update formula that would be invalidated by the new type.
- If you encrypt a custom field by using Shield Platform Encryption, you can’t change the field type.
- If you change a custom field data type via the metadata
deploy()method or a package upgrade and the deployment fails with an error related to custom field data types, see this knowledge article. This error can occur if a deployment changes the data type of one or more custom fields and the objects that contain the affected custom fields contain a large amount of data. The limit is 85 million custom field type conversions. For example, if you have an object with 30 million records, and you change three text fields to picklists, that's a total of 90 million field type conversions, which is over the limit. - When you change a custom field data type, the conversion runs in the background. The
conversion can take a while depending on the size of the custom field, the number of
records affected, and the type of field conversion. In some cases, the conversion can take
over 24 hours to complete. These field data type changes take the longest.
- Changing from Picklist to Text, Picklist (Multi-Select), or Checkbox
- Changing from Text to Picklist
- Change from Date/Time to Time
- Changing from Time to Text
- Changing a custom field type can require changing many records at once. If your request is queued to process these changes, you receive an email notification when the process has completed.
Data Type Restrictions
These data types have other restrictions when you convert them.

