SugarCRM Fields, Changing Field Types

I don’t share this fact often, but SugarCRM fields can change types if you do it from the database. Assuming there are no vardefs specifying otherwise, here’s how I converted a set of dropdown (enum) fields to open-text (varchar) fields…

Caution, though! You can lose data if your change data types or shorten a field in a live database. Use your head. There’s a reason the SugarCRM Studio doesn’t do this for you.

This entry was posted in SugarCRM. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. agcopley
    Posted December 17, 2012 at 9:00 am | Permalink

    This is even simpler if you dont use Studio to create custom fields. The metadata is available for you in the custom/Extension/modules//Ext/Vardefs directory. No need to be writing SQL, and a repair and rebuild will apply the changes. Of course Mathew’s caveat about cropping data still applies

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Sage President\

Profiling Solutions, Inc
174 Carroll Street
Atlanta, GA 30312
Sales: 1 (866) 515-9959
Office Phone: (404) 525-8003
Office Fax: (404) 525-8005