Results 1 to 2 of 2

Thread: auto populate fields within create a new case

  1. #1
    bobby j is offline Junior Member
    Join Date
    Nov 2010
    Posts
    1

    Default auto populate fields within create a new case

    Hi,

    Please forgive me if this has been asked/answered before (any links to solutions appreciated)

    I have recently been tasked with setting up Sugar for use within our technical support dept.

    logging / updating / closing calls etc.

    The ideal situation is :-

    I enter the callers on the create case page, the users contact number, company name and email address are automatically populated (I know this can have issues with duplicate names, but if there are only two duplicates it shouldn't be to much hassle to re-enter the searched name)

    We are using SugarEnterprise Version 6.0.1 (Build 4143)

    All stock modules, although the layouts have been adjusted and tweeked.

    I have tried searching Google but so far had no luck in finding a solution

    Many thanks for your time and solutions

  2. #2
    robertbmirth is offline Sugar Community Member
    Join Date
    Jun 2010
    Location
    Irvine, CA
    Posts
    345

    Default Re: auto populate fields within create a new case

    mmkay, this is a rather complex task but if you know a bit of ajax you should be able to do it. Assuming that, the only knowledge of sugar you'll need to know is that you'll have to modify editviewdefs.php. You can input javascript tags in your editviewdefs.php like thus:
    PHP Code:
    'panels' => 
        array (
          
    'default' => 
          array (
            
    => 
            array (
              
    => array (
                
    'name' => 'course',
                
    'studio' => 'visible',
                
    'label' => 'LBL_COURSE',
                  
    'displayParams' => array('javascript'=>'onchange="
                      if(this.value != \'\')
                          //Make Ajax/jQuery call and populate fields with the data.; 
                                   "'
    ),
              ), 
    Most of this should already be in there, you'll just have to edit the displayParams field with whatever javascript you come up with.

    You can put the javascript inline here or you can define it in a file (although if you define it in a file you'll have to include that file in the definitions as well, and i can't remember how to do that; I would normally reference the wiki but that's not an option anymore ).
    Robert Beckman
    Software Engineer
    Mirth Corporation

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto create case with inbound email?
    By daledude in forum Help
    Replies: 2
    Last Post: 2010-12-24, 09:46 AM
  2. Relate and Auto populate fields
    By sean780909 in forum SugarWiki Discussion Forum
    Replies: 2
    Last Post: 2008-09-09, 10:24 PM
  3. Auto populate address fields in 4.5
    By joshmark in forum Help
    Replies: 3
    Last Post: 2008-04-18, 11:01 AM
  4. Auto Calculate & Populate Fields
    By coowboy in forum Developer Help
    Replies: 2
    Last Post: 2006-06-26, 11:58 AM
  5. Auto Case Create with E-mail
    By leo@zingotel.com in forum Help
    Replies: 0
    Last Post: 2006-04-21, 08:32 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
  •