Results 1 to 5 of 5

Thread: How can I increase field size?

  1. #1
    sv2k is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    19

    Question How can I increase field size?

    Hello.

    I've adjusted the sic_code field (in the Accounts) for our needs and we stored other codes in it.
    Now It's become necessary to increase the length from 10 to 12.
    I increased the varchar field size in the db, but in the interface there are maxlength set to 10 left.
    Why it isn't pick up? What's the folly?
    How can I solve the problem?

    Thanks in advace.

  2. #2
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: How can I increase field size?

    That's because there is a double definition. There's a mysql definition, and Sugar has it's own...You have to modify modules/Accounts/vardefs.php and increase the size there. Also, you have to modify Accounts/EditView.html and increase the maxlength value over there. You might also have to repair the database in the Configuration tab.

    Note that you will lose upgrading options here. Future releases might undo your changes and corrupt your install.

  3. #3
    HomeTeam is offline Sugar Community Member
    Join Date
    Jan 2007
    Posts
    55

    Default Re: How can I increase field size?

    I had the same concern so I made the necessary changes to vardefs and editview.html.. Now I am bale to ENTER in the needed 25 characters, only to have the input truncated upon saving.. any ideas? How do I repair things in the configuration tab?? Do you mean the admin tab?? Please advise.... Thanks again for all the great input.

    HOMETEAM

  4. #4
    andydreisch's Avatar
    andydreisch is offline Sugar Team Member
    Join Date
    Apr 2005
    Location
    San Jose
    Posts
    2,080

    Default Re: How can I increase field size?

    Hi HomeTeam, it's Admin -> Repair ... Database. And I'm not certain that this will actually increase the storage size in the DB. I just don't know off the top.

    If not then you can use the ALTER TABLE statement to stretch out the DB columns in MySQL.

    Andy
    Andy Dreisch
    Vice President, Online Team


    Check out our Podcasts!
    Sugar University for training
    Sugar Wiki for developer and user help
    SugarForge for modules, themes, lang packs
    SugarExchange for production-ready extensions
    Enter/view bugs via the Sugar bug tracker

  5. #5
    lvangool is offline Sugar Community Member
    Join Date
    Jul 2006
    Location
    Near Rotterdam, Holland
    Posts
    280

    Default Re: How can I increase field size?

    Andy is right, it's the Repair DB option in the Admin->Repair module. It should increase the size.

    Be warned that Andy's alternative method is bad...mmmkay? If you do it anyway, just don't try to migrate/upgrade SugarCRM after that...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. custom field to sugar field
    By tanhaa in forum Developer Help
    Replies: 2
    Last Post: 2011-05-04, 03:52 PM
  2. Error when adding custom field
    By arrigenna in forum Help
    Replies: 0
    Last Post: 2006-03-31, 05:26 PM
  3. Changing the size of a Sugar field
    By roberrington in forum Help
    Replies: 0
    Last Post: 2006-01-10, 07: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
  •