Results 1 to 3 of 3

Thread: Change custom field from integer to text?

  1. #1
    swcramer's Avatar
    swcramer is offline Member
    Join Date
    Mar 2009
    Location
    Fort Wayne, Indiana
    Posts
    7

    Default Change custom field from integer to text?

    We originally created a custom lead field as type integer.

    We store an 8 digit id number in it. However, it formats it wherever you view it with commas. Since we don't use it as an actual integer, I'd like to just convert the field to text.

    I did a test and changed the field in the MySQL table leads_cstm from integer to varchar BUT it doesn't do anything within SugarCRM. Studio still lists the value as integer and all the values are still formatted with commas.

    Any ideas?

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: Change custom field from integer to text?

    You need to update the field's definition within the fields_meta_data table.

    Alternatively, make a new text field, copy the data from the old field into it, then simply delete the old field.
    Regards,

    Angel Magaņa
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    swcramer's Avatar
    swcramer is offline Member
    Join Date
    Mar 2009
    Location
    Fort Wayne, Indiana
    Posts
    7

    Default Re: Change custom field from integer to text?

    Thanks!

    I edited the value for the custom field in the fields_meta_data table and I also changed the value for the field in leads_cstm table. Then I did a repair/rebuild. Everything is fixed the way I want it.

    -Scott

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 10
    Last Post: 2010-12-24, 05:56 PM
  2. Replies: 2
    Last Post: 2008-12-08, 11:20 PM
  3. Custom validation of a text field
    By Phniux in forum Developer Help
    Replies: 11
    Last Post: 2008-11-25, 10:42 PM
  4. Replies: 3
    Last Post: 2008-06-27, 10:16 AM
  5. Custom Field integer
    By adam.c in forum Help
    Replies: 1
    Last Post: 2007-11-13, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •