Results 1 to 2 of 2

Thread: How to create new Data type ?

  1. #1
    rpgptbr is offline Junior Member
    Join Date
    Dec 2011
    Posts
    6

    Default How to create new Data type ?

    Hi, I already read many threads on this forum, although none of them was actually clear to me of how to create a new Data Type, based on the Address Data Type.

    I want to create a custom Address Data Type where I can add other fields such as (Neighborhood, address complement, ...) even using drop down fields for cities, states, neighborhood. BUT, I was trying to create the data type so I could use the Module Builder to create a custom field with this new Data Type.

    I copied the files from the Address folder, customized the name (called it CustomAddress), updated the CustomAddress.php file, its js script. BUT, when I declare the custom field in Module Builder, it doesn't create all the fields (street, city, ...) as the default Address data type creates.

    Does anyone know where I should make updates to add other fields into the CustomAddress data type ? And where to place the files in custom folder, to be upgrade safe ?

    Thanks a lot, in advance!
    Rodrigo

  2. #2
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: How to create new Data type ?

    New "datatypes" could be created under folder: include/SugarFields/Fields
    After create a new field type there is just use it in your layouts.
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to create a new data Type and display in the dropdown list
    By sugarcrmfans in forum Developer Help
    Replies: 2
    Last Post: 2011-05-12, 10:37 AM
  2. Replies: 0
    Last Post: 2011-04-01, 08:48 AM
  3. Create a New Data Type?
    By sbrendtro in forum Developer Help
    Replies: 2
    Last Post: 2009-09-02, 07:54 PM
  4. need help to create custom datetime data type
    By sslhbala82 in forum Developer Help
    Replies: 0
    Last Post: 2008-06-20, 03:07 PM
  5. Creating a New Data Type...
    By eggsurplus in forum Help
    Replies: 5
    Last Post: 2008-04-12, 10:49 PM

Tags for this Thread

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
  •