Results 1 to 7 of 7

Thread: vardef.ext.php not being merged with other files?

  1. #1
    ravensorb is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    19

    Default vardef.ext.php not being merged with other files?

    I am not sure where to post this, so I thought I would start here. Here is the situation. I have customized the Contact entity by adding a 1-to-many relationships with a custom entity. This is working fine. The issue comes when I try to manual customization.

    I am following the instructions found here

    http://developers.sugarcrm.com/docs/...r.html#9000029

    I create a file called Updated_vardefs.php with my customizations in it and then I do a quick repair and rebuild, everything seems to work, but the vardefs.ext.php file does not contain the merged result of my customizations from the UI and the Updated_vardefs.php -- could this be bug? Or am I doing something wrong?

  2. #2
    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: vardef.ext.php not being merged with other files?

    Can you let us know the file you created and its content?

    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.

  3. #3
    ravensorb is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    19

    Default Re: vardef.ext.php not being merged with other files?

    Sure, it is a very simple modification right now

    <?php

    $dictionary["Contact"]["fields"]["primary_address_country"]["type"] = 'enum';
    $dictionary["Contact"]["fields"]["primary_address_country"]["options"] = 'countries_dom';

    $dictionary["Contact"]["fields"]["alt_address_country"]["type"] = 'enum';
    $dictionary["Contact"]["fields"]["alt_address_country"]["options"] = 'countries_dom';

    ?>

    if I add this same code directly to the main vardefs.php -- everything works perfect.

    I am following this post (I think it is one of your)

    http://www.sugarcrm.com/forums/showthread.php?t=56333

  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: vardef.ext.php not being merged with other files?

    Where exactly did you add this code? Let us know the full path of the file.

    Regards
    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
    ravensorb is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    19

    Default Re: vardef.ext.php not being merged with other files?

    I am pretty sure I have them in the correct location:

    /var/www/sugarcrm/custom/modules/Contacts/Ext/Vardefs$ ls -FCla
    total 16
    drwxrwsrwx 2 www-data www-data 4096 2010-02-15 19:32 ./
    drwxrwsrwx 5 www-data www-data 4096 2010-02-15 20:31 ../
    -rwxrwxrwx 1 www-data www-data 657 2010-02-15 19:33 custom.php*
    -rwxrwxrwx 1 www-data www-data 1835 2010-02-15 23:14 vardefs.ext.php*

  6. #6
    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: vardef.ext.php not being merged with other files?

    You need to add into:
    /var/www/sugarcrm/custom/Extension/modules/Contacts/Ext/Vardefs/

    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.

  7. #7
    edwaa is offline Member
    Join Date
    Apr 2010
    Posts
    7

    Angry Re: vardef.ext.php not being merged with other files?

    I'm following the directions here and not having any luck.

    File I've created:
    Code:
    /custom/Extension/modules/Accounts/Ext/Vardefs/updated_vardefs.php
    Contents of updated_vardefs.php:
    Code:
    <?php
    
        $dictionary['Accounts']['fields']['id']['len'] = 50;
    
    ?>
    To execute these changes I'm going to Admin -> Repair -> Quick Repair and Rebuild.

    The summary textarea that explains what changes will be made shows the 'id' field in 'Accounts' being changed to a length of 36 (I've already manually changed the field length in the db table):
    Code:
    /* Table : accounts */
    /*COLUMNS*/
    /*MISMATCH WITH DATABASE - id -  ROW [name] => 'id'  [type] => 'char'  [len] => '50'  */
    /* VARDEF - id -  ROW[name] => 'id'  [vname] => 'LBL_ID'  [type] => 'char'  [required] => 'true'  [reportable] => '1'  [comment] => 'Unique identifier'  [dbType] => 'id'  [len] => '36'  */
    /* INDEXES */
    ALTER TABLE accounts   modify column id char(36)  NOT NULL ;
    Any ideas?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to add delete and merged records to Tracker
    By thowden in forum Developer Tutorials
    Replies: 1
    Last Post: 2012-05-09, 06:09 PM
  2. Replies: 2
    Last Post: 2009-04-28, 12:32 AM
  3. Logging Merged Duplicates
    By dwolff51 in forum Help
    Replies: 1
    Last Post: 2008-08-21, 02:12 AM
  4. Merged Fields - like First name & Address
    By russellp in forum Help
    Replies: 0
    Last Post: 2006-10-02, 09:23 AM

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
  •