Results 1 to 8 of 8

Thread: Show Account fields in Contact view?

  1. #1
    traynor is offline Member
    Join Date
    Sep 2009
    Posts
    11

    Default Show Account fields in Contact view?

    Hi-

    Is it possible to set up Contacts view so that we can see the associated Account information there also?

    For example, Acme Account has custom fields in it, and when I view a Contact associated with that Account I want to see the Account custom fields in the Contact view so I don't have to click to view Account to see them.

    How do I do this?

    Thanks.
    Last edited by traynor; 2009-09-08 at 07:20 PM. Reason: clarification

  2. #2
    christianknoll's Avatar
    christianknoll is offline Sugar Community Member
    Join Date
    Nov 2008
    Location
    Vienna
    Posts
    939

    Default Re: Show Account fields in Contact view?

    you need to load the info in the bean and send it to the form and there disply it. Requires some php knowledge but should be easy to do. Just did a similar thing for a customer where we displayed contacts for an account in a call and did let them choose with a radio button to whom to build the relationship. Also had account infos in the call screen.

    chrstian.

    Quote Originally Posted by traynor View Post
    Hi-

    Is it possible to set up Contacts view so that we can see the associated Account information there also?

    For example, Acme Account has custom fields in it, and when I view a Contact associated with that Account I want to see the Account custom fields in the Contact view so I don't have to click to view Account to see them.

    How do I do this?

    Thanks.

  3. #3
    traynor is offline Member
    Join Date
    Sep 2009
    Posts
    11

    Default Re: Show Account fields in Contact view?

    Is there a way to do this through the Admin Studio?

    If no, what is the format for this upload to the bean? Can I export the current accounts and import them somehow via .csv? What .php files need to be modified and how?

    Or, can you link me to some documentation of the process for this request?
    Last edited by traynor; 2009-09-09 at 03:37 AM. Reason: clarification, request for documentation

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Show Account fields in Contact view?

    Quote Originally Posted by traynor View Post
    Hi-

    Is it possible to set up Contacts view so that we can see the associated Account information there also?

    For example, Acme Account has custom fields in it, and when I view a Contact associated with that Account I want to see the Account custom fields in the Contact view so I don't have to click to view Account to see them.

    How do I do this?

    Thanks.
    1. Create an extended vardefs for Contacts and add into it the fields from Accounts module, as they are into Accounts module, these fields on Contacts module need to have the attribute 'source' => 'non-db';
    2. Go to Admin -> Repair -> Rebuild Extensions;
    3. Go to Admin -> Studio -> Contacts -> Layout -> add the pseudo fields into appropriate layouts;
    4. Create a custom controller for Contacts and implement the methods action_detailview and action_editbiew. Inside both modules you need to retrieve the related Account from database and fill in pseudo Contacts fields according to values on Account;

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    traynor is offline Member
    Join Date
    Sep 2009
    Posts
    11

    Default Re: Show Account fields in Contact view?

    Quote Originally Posted by andopes View Post
    1. Create an extended vardefs for Contacts and add into it the fields from Accounts module, as they are into Accounts module, these fields on Contacts module need to have the attribute 'source' => 'non-db';
    2. Go to Admin -> Repair -> Rebuild Extensions;
    3. Go to Admin -> Studio -> Contacts -> Layout -> add the pseudo fields into appropriate layouts;
    4. Create a custom controller for Contacts and implement the methods action_detailview and action_editbiew. Inside both modules you need to retrieve the related Account from database and fill in pseudo Contacts fields according to values on Account;

    Cheers
    Hi Andre - thanks for the help.

    Question: Can I create the extended vardefs from inside the Sugar Admin section or do I need root ftp access?

    We're evaluating a trial of Sugar that's hosted at sugarondemand.com...

  6. #6
    mmllcid1 is offline Member
    Join Date
    Aug 2009
    Posts
    9

    Default Re: Show Account fields in Contact view?

    could you provide sample code for the vardefs.ext.php file?
    for example i have a custom field in accounts called subtype_c that i want to display on my Contacts list view. I've been working on this a while and can't seem to make it work.

    Thanks for any help you can provide.

  7. #7
    traynor is offline Member
    Join Date
    Sep 2009
    Posts
    11

    Default Re: Show Account fields in Contact view?

    I've transitioned to Community Edition and am now able to edit files on the server - can we "re-open" this thread?

    How do I create an "extended vardefs"? Will this be a new .php file, or will it be an addition to a vardefs.php file that already exists?

    I found "vardefs.php" file in the modules/Contacts/ folder and also one in the modules/Accounts folder. Do I make additions to either of these vardefs.php files, or both (or neither)?

    I'm also reading up on Vardefs at the Sugar Wiki. Is there a section in here that outlines this process or sheds more light on it?:

    http://www.sugarcrm.com/wiki/index.php?title=Vardefs

    Or, did you figure out your solution for this mmllcid1 ??
    Last edited by traynor; 2009-09-21 at 07:03 PM.

  8. #8
    Moher is offline Member
    Join Date
    Oct 2009
    Posts
    8

    Default Re: Show Account fields in Contact view?

    Bump...some insight or pointing in the right direction for extended vardefs and how they relate to showing Account custom fields in Contacts would be EXTREMELY helpful!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Account address to show up in Cases Detail View
    By mylo78 in forum Developer Help
    Replies: 5
    Last Post: 2012-03-12, 12:32 PM
  2. Replies: 5
    Last Post: 2009-06-04, 01:49 PM
  3. Replies: 3
    Last Post: 2008-06-23, 04:17 PM
  4. Replies: 1
    Last Post: 2007-02-20, 09:50 PM
  5. show type and industry in Account List View
    By fabpenso in forum General Discussion
    Replies: 3
    Last Post: 2005-06-07, 06:14 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
  •