Results 1 to 2 of 2

Thread: Add a custom field without Studio

  1. #1
    abhax's Avatar
    abhax is offline Senior Member
    Join Date
    Jun 2010
    Location
    India
    Posts
    65

    Default Add a custom field without Studio

    Hi people,

    Version 6.0.0 (Build 3905)


    I have added a custom field without using the Studio.
    custom/Extension/modules/Users/Ext/Vardefs/UsersVardefs.php

    PHP Code:
    <?php
    $dictionary
    ['Users']['fields']['defaulthomepage2_c'] = array (
          
    'required' => false,
          
    'source' => 'custom_fields',
          
    'name' => 'defaulthomepage2_c',
          
    'vname' => 'LBL_DEFAULTHOMEPAGE2',
          
    'type' => 'varchar',
          
    'massupdate' => '0',
          
    'default' => NULL,
          
    'comments' => '',
          
    'help' => '',
          
    'importable' => 'true',
          
    'duplicate_merge' => 'disabled',
          
    'duplicate_merge_dom_value' => '0',
          
    'audited' => false,
          
    'reportable' => true,
          
    'len' => '255',
          
    'size' => '20',
          
    'id' => 'Usersdefaulthomepage2_c',
          
    'custom_module' => 'Users',
        );
    ?>

    and in custom/Extension/modules/Users/Ext/Language/UserLang.php

    PHP Code:
    <?php
    $mod_strings 
    "LBL_DEFAULTHOMEPAGE2" ] = "Default Home Page";
    ?>

    I then Quick Repair it.
    I get the field in the custom/modules/Users/Ext/Vardefs
    but its not coming in the cache and also not showing up. cache/modules/Users

    any idea or is there another way to do so?
    This is working perfectly in Sugar 5.2(Repair Extensions)
    If It Is To Be, It Is Up To Me

  2. #2
    abhax's Avatar
    abhax is offline Senior Member
    Join Date
    Jun 2010
    Location
    India
    Posts
    65

    Smile Re: Add a custom field without Studio

    Quote Originally Posted by abhax View Post
    Hi people,

    Version 6.0.0 (Build 3905)


    I have added a custom field without using the Studio.
    custom/Extension/modules/Users/Ext/Vardefs/UsersVardefs.php


    <?php
    $dictionary['Users']['fields']['defaulthomepage2_c'] = array (
    'required' => false,
    'source' => 'custom_fields',
    'name' => 'defaulthomepage2_c',
    'vname' => 'LBL_DEFAULTHOMEPAGE2',
    'type' => 'varchar',
    'massupdate' => '0',
    'default' => NULL,
    'comments' => '',
    'help' => '',
    'importable' => 'true',
    'duplicate_merge' => 'disabled',
    'duplicate_merge_dom_value' => '0',
    'audited' => false,
    'reportable' => true,
    'len' => '255',
    'size' => '20',
    'id' => 'Usersdefaulthomepage2_c',
    'custom_module' => 'Users',
    );
    ?>


    This is working perfectly in Sugar 5.2(Repair Extensions)

    Hey people,
    Found the solution it was my fault.
    I had used Users as the module name instead i had to use User
    My Bad on that!!



    But Hope it is helpful !!!
    If It Is To Be, It Is Up To Me

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cannot add new custom field in Studio
    By azurtec in forum Help
    Replies: 8
    Last Post: 2009-05-29, 07:00 AM
  2. Custom module & studio field indexes
    By mcatling in forum Feature Requests
    Replies: 2
    Last Post: 2009-02-05, 08:34 AM
  3. dropdown custom field in Studio
    By gerald29 in forum General Discussion
    Replies: 3
    Last Post: 2009-01-24, 07:31 AM
  4. how do i create a custom field without using studio?
    By schnagga in forum Developer Help
    Replies: 3
    Last Post: 2008-05-30, 07:51 AM
  5. Replies: 0
    Last Post: 2006-11-09, 03:04 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
  •