How to Change Custom Field Type in Salesforce

In this Salesforce tutorial, we will learn How to Change Custom Field Type in Salesforce. We will discuss the method of changing custom field types with the help of an example in Salesforce Lightning and Salesforce Classic.

Changing Custom field types

In Salesforce development we require updates and modifications regularly and changing custom field types is also among those modifications. While changing the Custom field types from one type to another type it should be considered that, we should not change the field type if there is a chance to lose the data.

Change the Custom field type in Salesforce Lightning

While working in Salesforce CRM, I had to change the custom field type Picklist (multi-select) field to a Picklist field. We created a Picklist(multi-select) field for Car products, which allowed users to choose multiple values from the field.

But later data requirements changed and it was required to make the user select a single value only and for that changing the Picklist (multi-select) to Picklist would be the ideal option.

To change a Custom Field type, log in to your Salesforce account and follow the steps below.

Step 1- Click on the Object Manager tab on the Setup page of Salesforce Lightning.

Change field type in Salesforce

Step 2- In the Object Manager, we will see a list of the object under the Label tag, and from the list select the object in which you have to change the field type. In this case, we have selected the object Product with an existing Custom Picklist (multi-select) field.

Change field type in Salesforce lightning

Step 3- In the Product (object) window, go to the left sidebar and select Fields and Relationships as shown in the below picture.

Salesforce lightning Change Field-Type

Step 4- In the Fields and Relationships, select the field in which you have to change the data type. In this case, I have chosen a Picklist (multi-select) field named New Car products to change its field type from Picklist (multi-select) to Picklist.

Salesforce lightning Change Field Type of custom field

Step 6- In this step, go to the section Custom Field Definition Detail and there click on the Edit button as shown in the below picture.

Custom field type change in Salesforce

Step 7- In the Edit Product Custom Field tab, click the Change Field Type button in the Custom Field Definition Edit section as shown in the picture below.

Custom field type change in Salesforce Lightning

Step 8- Now in this window, select the field type to replace the previous field type. In this case, we have Picklist (multi-select), so we will get only Picklist in options to change the field type.

See also  How to Sort Picklist Values into Alphabetical Order in Salesforce

First, click on the radio button Picklist, then you will see a pop-up window with an alert showing that we will lose existing data of the field if you are okay with losing the data then click on the OK button and lastly click on the Next button

Change Field type of custom Field in Salesforce lightning

Step 9- In this step of entering the field details, click on the Next button without making any changes.

Salesforce lightning Change Custom Field type

Step 10- Now, activate the Visible check box if you want to make this field visible for all users, and then click on the Save button.

Change Custom Field Type in Salesforce

As we click on the Save button the Picklist (multi-select) field will be changed to Picklist. We can see in the below picture that the selected Picklist (multi-select) field New Car Products is changed to Picklist data type.

Custom field type changed in Salesforce Lightning

We have successfully changed a Custom field type from Picklist (multi-select) to Picklist data type.

Read: How to Create Text Area Field Type in Salesforce

Change the Custom field type in Salesforce Classic

In this scenario, we created a Picklist (multi-select) field for lead contracts, and managing all leads with a multi-select field was giving errors while picking a lead from the list because Picklist (multi-select) field store multiple values as a single string making it challenging to perform regular reports.

By making it a picklist, each value becomes a separate field entry making it easier for making reports and analyses.

To change a Custom Field type in Salesforce Classic, log in to your Salesforce account and follow the steps below.

Step 1– In case, you are logged in to Salesforce Lightning mode then click on the user profile picture as shown in the below picture, and in the dropdown click on Switch to Salesforce Classic.

Change Custom Field type in Salesforce Classic

Step 2- On the home page of Salesforce Classic, click on the Setup tab.

Salesforce Classic Change Field Type of custom field

Step 3- In the Setup tab, go to the Build section in the Right sidebar there click on Customize dropdown, and from the dropdown select the object in which you have to change the Custom Field Type. In this case, I have chosen the object Contracts and in the contracts, dropdown click on Fields.

Change Custom Field data type in Salesforce Classic

Step 4- In the Fields window, scroll down and go to the section Custom Fields & Relationships, and from there select the custom field in which you have to change the field type. In this case, I have a Picklist (multi-select) field Lead Contracts to change that into Picklist Field. There click on the Edit button as shown in the below picture.

See also  External Lookup Relationship in Salesforce
Salesforce Change Custom Field type in Classic mode

Step 5- As we click on the Edit button, the Edit Custom Field window will open and there we will go to the section Custom Field Definition Edit and click on the button Change Field Type as shown in the below picture.

Custom field type changed in Salesforce Classic

Step 6- In this step, we have to choose the field type to replace the existing field type. In this case, We will change the field type of a Picklist (multi-select) field so we will activate the radio button Picklist.

As we activate the radio button we will see a pop-up window with a warning to lose all existing data in this field while changing its data type. If you are okay with the loss of data in the field then click the OK button and then click on the Next button.

Salesforce Change Custom Field data type

Step 7- In this step, you can change the Field Label if required, otherwise you can click the Next button without making any changes.

Salesforce Classic Change Data Type of custom field

Step 8- In this window, we will establish the field level security and if you want to make this field available for all users then activate the Visible check box and click on the Save button.

Change data type of Custom Field in Salesforce Classic

As we click on the Save button, then you will see in the Custom Fields and Relationships the Picklist (multi-select) field will be changed to Picklist Datatype as shown in the picture below.

Change data type of Custom Field in Salesforce

We have successfully changed a Custom field type in Salesforce Classic from Picklist (multi-select) to Picklist data type.

Conclusion

In this tutorial, we have learned to change the Custom Field Type with the help of examples. We have discussed the method of changing the Custom field type in Salesforce Lightning and Salesforce Classic.

See also  How to Set Visible Lines for Text Area Long Field in Salesforce

Along with this, we have also understood the need of changing field types in Salesforce with the help of the above scenarios.

You may like to read: