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.
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.
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.
Duplicate Post :
http://boards.developerforce.com/t5/New-to-Cloud-Development/Data-Type-changed-Picklist-to-multi-select-picklist/m-p/314297#M2511
Thanks
Ankit Arora
Blog | Facebook | Blog Page