Results 1 to 2 of 2

Thread: Usage of field_array.php file?

  1. #1
    sugarcrmvn is offline Sugar Community Member
    Join Date
    Mar 2006
    Posts
    22

    Default Usage of field_array.php file?

    Hello all,
    This is the content of field_array.php of Account module:
    PHP Code:
    $fields_array['Account'] = array ('column_fields' => Array(
            
    "annual_revenue"
            
    ,"billing_address_street"
            
    ,"billing_address_city"
            
    ,"billing_address_state"
            
    ,"billing_address_postalcode"
            
    ,"billing_address_country"
            
    ,"date_entered"
            
    ,"date_modified"
            
    ,"modified_user_id"
            
    ,"assigned_user_id"
            
    ,"description"
            
    ,"email1"
            
    ,"email2"
            
    ,"employees"
            
    ,"id"
            
    ,"industry"
            
    ,"name"
            
    ,"ownership"
            
    ,"parent_id"
            
    ,"phone_alternate"
            
    ,"phone_fax"
            
    ,"phone_office"
            
    ,"rating"
            
    ,"shipping_address_street"
            
    ,"shipping_address_city"
            
    ,"shipping_address_state"
            
    ,"shipping_address_postalcode"
            
    ,"shipping_address_country"
            
    ,"sic_code"
            
    ,"ticker_symbol"
            
    ,"account_type"
            
    ,"website"
            
    "created_by"



            
    ),
            
    'list_fields' => Array('id''name''website''phone_office''assigned_user_name''assigned_user_id'
        
    'billing_address_street'
        
    'billing_address_city'
        
    'billing_address_state'
        
    'billing_address_postalcode'
        
    'billing_address_country'
        
    'shipping_address_street'
        
    'shipping_address_city'
        
    'shipping_address_state'
        
    'shipping_address_postalcode'
        
    'shipping_address_country'




            
    ),
            
    'required_fields' => array("name"=>1),
    ); 
    Somebody can explain the meaning of "comlum_fields, list_fields, required_fields"?

    Many thanks,
    OS: Window XP SP2
    Web Server: Apache 2.0.55
    PHP: 5.1.2
    MySQL: 4.1.11
    Sugar Suite: 4.0.1e

  2. #2
    ispytodd is offline Sugar Community Member
    Join Date
    Dec 2005
    Posts
    12

    Default Re: Usage of field_array.php file?

    yeah it's one year later.. what the heck. I was researching the same thing you asked.

    From another thread:
    "You need to include the field defs in two places in the class (regular vars, and the array column_fields) and also in the vardefs.php file for the module."

    So it looks like every new field must be declared in 3 places: vardefs.php, column_fields, and as a regular var in bean.php. I've noticed that some modules have fields listed in list_fields instead of column_fields.

    I've noticed that some people declare column_fields within bean.php . Some people use a seperate field_array.php.

    This is all based on my observations while trying to comprehend the new module development process. Please correct me if Im wrong.
    -T

Thread Information

Users Browsing this Thread

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

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
  •