Results 1 to 3 of 3

Thread: custom field: change type from integer to currency?

  1. #1
    wivaku is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    38

    Default custom field: change type from integer to currency?

    I have a custom field in the Opportunities module (Sugar 5.1b Professional Onsite running on Linux with MySQL 4.1), would like to change it from type "integer" to type "currency".

    I can not change the type using the Sugar Studio, but perhaps there are other -more manual- ways to achieve it? Any suggestions?

    Current settings:
    - data type: integer
    - field name: mix_sw_c
    - default value: 0
    - max size: 11

  2. #2
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: custom field: change type from integer to currency?

    The real best way ist to create a new field and copy the old values to the new column in database.

    But you can change it by hand too - it is risky, do not try it without a actual backup of your system.

    STOP the webserver !

    In mySQL table fields_meta_data you must change values :
    - type from int to currency
    - len from 11 to 255

    In your custom table xxx_cstm you must change definition
    of mix_sw_c from integer to varchar(255).

    Start the Webserver but disable any user login (e.g. change entry address)

    Login as admin and run admin - repair -quick repair !

    Test the correct values.... if diffenences - fallback
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  3. #3
    wivaku is offline Sugar Community Member
    Join Date
    Oct 2006
    Posts
    38

    Default Re: custom field: change type from integer to currency?

    Good suggestions, thanks, will try them!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Howto Change Custom Field Data Type
    By andreasw in forum General Discussion
    Replies: 9
    Last Post: 2011-10-12, 04:07 PM
  2. Campos Currency, Integer ou Decimal?
    By jorgeluiz in forum Portugese
    Replies: 5
    Last Post: 2008-11-17, 07:10 PM
  3. How to change the type of a field?
    By ywingate in forum Help
    Replies: 6
    Last Post: 2008-08-14, 01:55 PM
  4. Is it a bug? Change the type of a custom field
    By ToniFatec in forum Developer Help
    Replies: 0
    Last Post: 2008-05-06, 03:17 PM
  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
  •