Results 1 to 7 of 7

Thread: Account history to contacts

  1. #1
    Moksu is offline Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Default Account history to contacts

    Hi,

    Is it somehow possible to show previously accounts in contacts list, what have been linked for each other.
    and not just current.

    any help is currently welcome
    Last edited by Moksu; 2009-04-24 at 05:58 AM.

  2. #2
    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: Account history to contacts

    Hi Moksu

    Are you meaning the historic of the previously linked Accounts to the current Contact?

    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.

  3. #3
    Moksu is offline Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Default Re: Account history to contacts

    Quote Originally Posted by andopes View Post
    Hi Moksu

    Are you meaning the historic of the previously linked Accounts to the current Contact?

    Cheers
    Yes exactly like that, not just showing "currently"

    thanks in advance

  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: Account history to contacts

    It is pretty possible!
    You need to create a function based subpanel.
    Have a look on modules/Campaigns/metadata/subpaneldefs.php. You will see there are some subpanel whose get_subpanel_data refers to a function rather than a relationship.
    So you need to create a custom controller for Contacts (custom/modules/Contacts/controller.php) and implement the function action_detailview.
    Inside this view you need to override the $this->bean as an instance of a new class which extends the default Contact class.
    Create this new class and implement into it the function invoked in the new layoutdefs entry.
    The function must return a query containing the id of the Accounts.
    You need to select the ids from accounts_contacts table whose contact_id is the own contact id and the deleted field is '1'.

    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
    Moksu is offline Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Default Re: Account history to contacts

    Quote Originally Posted by andopes View Post
    It is pretty possible!
    You need to create a function based subpanel.
    Have a look on modules/Campaigns/metadata/subpaneldefs.php. You will see there are some subpanel whose get_subpanel_data refers to a function rather than a relationship.
    So you need to create a custom controller for Contacts (custom/modules/Contacts/controller.php) and implement the function action_detailview.
    Inside this view you need to override the $this->bean as an instance of a new class which extends the default Contact class.
    Create this new class and implement into it the function invoked in the new layoutdefs entry.
    The function must return a query containing the id of the Accounts.
    You need to select the ids from accounts_contacts table whose contact_id is the own contact id and the deleted field is '1'.

    Cheers
    Will give it a try, even tho sounds a bit hard.

    Thanks!

  6. #6
    Moksu is offline Junior Member
    Join Date
    Apr 2009
    Posts
    4

    Default Re: Account history to contacts

    Andopes, are you sure there is no easier way for adding this "function" for sugarCRM?

  7. #7
    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: Account history to contacts

    Definitely yes!
    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 2008-04-10, 03:36 PM
  2. Replies: 2
    Last Post: 2007-05-30, 04:24 PM
  3. Problems with account history
    By djdeth in forum Help
    Replies: 0
    Last Post: 2007-04-02, 09:37 PM
  4. Call reports on contacts viewes on the account history
    By hheckner in forum General Discussion
    Replies: 1
    Last Post: 2006-10-18, 08:15 AM
  5. Replies: 0
    Last Post: 2006-08-28, 01:27 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
  •