Results 1 to 4 of 4

Thread: Auto filling fields using calculation.

  1. #1
    user21 is offline Junior Member
    Join Date
    Mar 2009
    Posts
    2

    Default Auto filling fields using calculation.

    I’m new to SugarCRM and edited the accounts module and added my own fields.
    I need help trying to figure out how to populate some fields automatically by calculation using existing fields.
    For Example
    Total cost to be automatically calculated and populated by adding the cost filed plus 1.2% tax.

    How would I go about doing this on the accounts module?

    Mike

  2. #2
    jertothejig is offline Member
    Join Date
    Feb 2009
    Location
    Los Angeles
    Posts
    9

    Default Re: Auto filling fields using calculation.

    Mike,
    If you come across anything for Sugar 5.2 please let another nube know. I have been looking for a while now. Not doing so well piecing together some of the threads.

    j

  3. #3
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Auto filling fields using calculation.

    Quote Originally Posted by user21 View Post
    Total cost to be automatically calculated and populated by adding the cost filed plus 1.2% tax.
    How would I go about doing this on the accounts module?
    You need to create a before_save logic hook that calculates the field before saving the record every time.
    See the sections on logic hooks in the DEV manual in my signature and if you search on threads started by me I posted a script that can help you create them.

    Your hook should do something like this:
    PHP Code:
    $bean->total_cost_c $bean->cost_c 101.2
    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

  4. #4
    user21 is offline Junior Member
    Join Date
    Mar 2009
    Posts
    2

    Default Re: Auto filling fields using calculation.

    Thanks Marnus, i'll look into this.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Simple Calculation Fields in Opportunities
    By danheff in forum Developer Help
    Replies: 17
    Last Post: 2009-04-22, 07:22 PM
  2. Auto filling of EditView items from popup
    By webnetin in forum Help
    Replies: 0
    Last Post: 2008-10-27, 01:19 PM
  3. Email Templates Still not Filling Fields
    By monkeyfish in forum Help
    Replies: 3
    Last Post: 2008-07-16, 06:52 PM
  4. Automaticly filling of custom fields
    By blooberi in forum Developer Help
    Replies: 0
    Last Post: 2008-06-26, 02:38 PM
  5. Auto Calculate & Populate Fields
    By coowboy in forum Developer Help
    Replies: 2
    Last Post: 2006-06-26, 11:58 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
  •