function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
decentshaildecentshail 

Data Type change: Picklist to multi select picklist

Hi All,

     I have to changed the data type of field (say Region__c) from picklist to multi picklist. But issue is this field is used in many apex classes and trggers in prod. Is there any way to change the data type without deploying the classes and trigger again.

 

Thanks,

Shail



Shashikant SharmaShashikant Sharma

You will not be able to change field types till you  remove reference from class or triggers

 

So you need to comment out references for a while and save commented code., change field type and uncomment the references and save again. You will need to deploy the classes as well , but pages you don't need to redeploy.

 

Now let me give you a rule , when you change field type you will see an error saying this field is used in a class or trigger etc. so type can not be changed . All the elements which came in references when you attempt to  change field type are the one which need to redploy with the updated field.