Results 1 to 4 of 4

Thread: how do i create a custom field without using studio?

  1. #1
    schnagga is offline Member
    Join Date
    May 2008
    Posts
    9

    Default how do i create a custom field without using studio?

    hi,

    i want to create a custom field in an upgrade safe manner without using studio for existing modules like Opportunities.
    i.e: if i create a currency field with the studio, it creates a db field of varchar(255) (MySQL). i want to specify a different type, and in general want to be more flexible with field parameters.

    i found the <module_name>vardefs.php and the fields_meta_data table, but i am not sure how to implement new fields in code, so that they are applied to the db and the existing module.

    i am using Sugar Version 5.0.0e

  2. #2
    nileshdave is offline Sugar Community Member
    Join Date
    Nov 2007
    Location
    Gujarat
    Posts
    95

    Smile Re: how do i create a custom field without using studio?

    Hi ,
    You have to put field defination in custom/<modulename>/Ext/<module>Vardef.php &
    custom/<modulename>/metadata/detailviewdef.php &
    custom/<modulename>/metadata/editviewdef.php

    try this i hope it solves the problem and its 100% upgrade safe

    Thanks
    NileshDave
    iNetPrecess

  3. #3
    DragonflyMaster is offline Sugar Community Member
    Join Date
    Dec 2007
    Location
    Rimini, Italy
    Posts
    1,421

    Default Re: how do i create a custom field without using studio?

    To learn about the correct syntax, you can build a custom field via studio and deploy. Then go in custom/modules/<module_name>/ and look at the files/folders created in there, so you can replicate them at your wish.
    What do you think the cookie monster eats ?

  4. #4
    schnagga is offline Member
    Join Date
    May 2008
    Posts
    9

    Default Re: how do i create a custom field without using studio?

    hi, thx for your help.

    i couldn't get it to work to make a custom field of type 'currency' with 'dbType' double. i finally reduced the varchar(255) size to varchar(14) with the 'len' attribute. dbType seems to have no effect when specifiying type 'currency'.

    kind regards

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 2009-08-20, 08:57 PM
  2. dropdown custom field in Studio
    By gerald29 in forum General Discussion
    Replies: 3
    Last Post: 2009-01-24, 07:31 AM
  3. Custom fields using Studio Field Editor with zero values
    By mbaucsoft in forum Developer Help
    Replies: 3
    Last Post: 2008-12-22, 11:05 PM
  4. Replies: 2
    Last Post: 2008-02-19, 05:32 PM
  5. Custom Field Repetition
    By newseed in forum Help
    Replies: 0
    Last Post: 2006-10-18, 09:44 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
  •