Results 1 to 6 of 6

Thread: Creating a New Data Type...

  1. #1
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Creating a New Data Type...

    I've found how to create a new data type and it works great in the module builder for new modules but if you try to add that data type to an existing module in Studio it doesn't work the same. There are a couple of associated fields that are set to be studio=hidden but they show up still on the Studio side. I'm mimicking the TemplateParent data type which sets the parent_type field to hidden.

    I've added the hidden fields to the exclusions array in modules/DynamicFields/DynamicField.php:
    PHP Code:
    $exclusions = array('parent_type''parent_id''currency_id''parent_name','filename','file_ext','file_mime_type'); 
    Which saves it the to the database without the _c extension. This works great. Everything seems fine except for the studio keeps showing these hidden fields. Well, deleting the main field doesn't delete the related fields correctly in Studio but it does in ModuleBuilder.

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Creating a New Data Type...

    Found the issue. There was an error in the built-in function cullFields($def) in modules\ModuleBuilder\views\view.modulefields.php. It should have a reference to the $def array and look like:

    function cullFields(&$def){
    ..........
    }

  3. #3
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Creating a New Data Type...

    That solved the issue of certain fields showing in the studio editor. There is still an issue where 'studio'='hidden' is not being set correctly in the Studio version. Works fine in ModuleBuilder. Also, a non-db source field is saving to the database in Studio. Doesn't in ModuleBuilder. Must be something to do with the defs set up in Studio.

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Creating a New Data Type...

    Hi, eggsurplus

    It is so nice.
    Great job!
    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Creating a New Data Type...

    It's so nice that I'm struggling to figure out the difference between Studio and ModuleBuilder?

    Thanks

  6. #6
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Creating a New Data Type...

    OK, at this point it shows correctly. It just takes two attempts to delete which is the same as the flex relate and relate fields so this must just be a bug in Sugar. Not a big one. Moving on...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem on Step 7 of Install
    By ChrisA2107 in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2007-08-20, 08:31 AM
  2. problemi step 6 di SugarSuite-Full-4.0.1h
    By lucia in forum Italiano
    Replies: 0
    Last Post: 2006-12-27, 08:50 AM
  3. Replies: 1
    Last Post: 2006-10-12, 12:07 AM
  4. 4.0.1 Installation Problem
    By clawton in forum Help
    Replies: 14
    Last Post: 2006-02-13, 04:17 PM
  5. Fatal error: Max
    By spokes2k4 in forum Help
    Replies: 3
    Last Post: 2006-01-15, 03:50 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
  •