Results 1 to 2 of 2

Thread: How to create a function for a computed field

  1. #1
    elvinjoe is offline Sugar Community Member
    Join Date
    Jan 2008
    Posts
    36

    Default How to create a function for a computed field

    Hi guys,

    I would like to create a field in SugarCRM that the displays a computed value.Age to be specific

    I created the function getCustomerAge() in modules/CustomModule/CustomModule.php.
    Added the 'function' => array('name =>''getCustomerAge', 'include' => 'modules/CustomModule/CustomModule.php.') in the field array for the computed field.

    However everytime i open a record the following error occurs

    Fatal error: Call to undefined function getCustomerAge() in D:\www\SugarEE_local\include\EditView\EditView2.ph p

    I even tried defining and calling the default function fill_in_additional_list_fields() but the same thing happens. . . .

    did I miss something. . . please enlighten me. . .

    thanks

    elvinjoe

  2. #2
    jmertic is offline Sugar Community Manager
    Join Date
    Dec 2007
    Posts
    2,224

    Default Re: How to create a function for a computed field

    Quote Originally Posted by elvinjoe
    Hi guys,

    I would like to create a field in SugarCRM that the displays a computed value.Age to be specific

    I created the function getCustomerAge() in modules/CustomModule/CustomModule.php.
    Added the 'function' => array('name =>''getCustomerAge', 'include' => 'modules/CustomModule/CustomModule.php.') in the field array for the computed field.

    However everytime i open a record the following error occurs

    Fatal error: Call to undefined function getCustomerAge() in D:\www\SugarEE_local\include\EditView\EditView2.ph p

    I even tried defining and calling the default function fill_in_additional_list_fields() but the same thing happens. . . .

    did I miss something. . . please enlighten me. . .

    thanks

    elvinjoe
    Did you add the function as a method to the CustomModule bean? If so then you'll want to move it out of that bean to be a standalone function.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HELP - Act import (field mapping)
    By smelamed in forum Help
    Replies: 32
    Last Post: 2010-12-15, 05:39 PM
  2. Replies: 0
    Last Post: 2007-08-08, 02:47 PM
  3. How to create field with link to detail view
    By Systems Navigator in forum Help
    Replies: 4
    Last Post: 2007-07-16, 11:58 AM
  4. I cannot create a textarea field
    By rferrer in forum Help
    Replies: 3
    Last Post: 2006-05-11, 03:33 AM
  5. Replies: 2
    Last Post: 2005-04-21, 06:53 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
  •