Announcement

Collapse
No announcement yet.

Change existing field type?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change existing field type?

    Under the accounts->create, there is a field called "type", that is an "Enum" field type that lists industries. Is it possible to change this to an "Multi-Enum"?

    Some accounts work in multiple sectors

  • #2
    Hi,

    1) export account : id and type
    2) delete in entity manager : account -> field -> type
    3) create in entity manager : account -> field -> type ... multi-enum
    4) import the file in point 1)

    don't forget clear-cache rebuild.. and clear browser for be sure.

    multi-enum have a new storage in db since v6 or >...

    try first in a "non production" but that do the trick certainly.
    Someone can confirm ?

    Comment


    • #3
      Better to create a new field. Enum and multi-enum are incompatible types.

      You can then write a before-save formula script that will take a first value from the multi-enum and write into enum. To preserve existing logic that relies on the enum "type".

      Comment


      • wusy8lqf
        wusy8lqf commented
        Editing a comment
        That makes sense, thankyou Yuri, it's on my list for tomorrow to deal with!
    Working...
    X