Results 1 to 2 of 2

Thread: Is there a way to have multiple relationships for a subpanel in 5.0 CE

  1. #1
    kander is offline Junior Member
    Join Date
    Jan 2008
    Posts
    3

    Default Is there a way to have multiple relationships for a subpanel in 5.0 CE

    Hello,


    WHAT I AM DOING:

    I am trying to create a custom module for my implementation of sugarCRM 5.0 CE. It is primarily based on the example_module.zip and I have managed to create all the simple elements easily so far. This is my current problem:


    MY PROBLEM:

    In the accounts subpanel for the widgets module I need it to list widgets belonging to that account (which works) as well as belonging to a contact that belongs to that account. Because I am new to sugarcrm the best way for me to describe it is with sql which would look like this:

    SELECT * FROM sugardata.widgets WHERE parent_id = '8f7cf9d0-50e3-569d-a6c1-46966bd7960b' OR parent_id IN (SELECT contact_id FROM sugardata.accounts_contacts WHERE account_id = '8f7cf9d0-50e3-569d-a6c1-46966bd7960b');

    If the id of the account producing the subpanel was 8f7cf9d0-50e3-569d-a6c1-46966bd7960b

    To summarize in high level sugarcrm terms; if you view the details of an account the widgets subpanel should be all widgets assigned to that account as well as widgets assigned to contacts belonging to that account.


    WHAT I WOULD LIKE TO LEARN

    What I need to do is specify a custom relationship, or maybe multiple relationships for the link field. If there is a way to specify custom SQL that would work or even use a function instead of a relationship in the $dictionary array, if possible.


    WHAT WORKS

    Currently I have recreated the widgets module and using a flex relate (as the module builder calls it, but I am not using UI tools so I don't know what else to call it) you can assign a widget to an account or a contact. If you view an account or contact the widget subpanel displays the widgets associated with that entry. This all works.

    TECH DETAILS:
    SugarCRM 5.0
    Running on a localhost test platform using XAMPP for Linux 1.6.4
    - PHP Version 5.2.4
    - MySQL Version 5.0.45
    all files of sugar have been chmod 777 (during testing)


    IN CLOSING

    Further technical details or code snippets available on request.

    I apologize that I repeated my question but I want to be sure it is clear because in the past I have not been very good at explaining things in forums.

    Any help is greatly appreciated. Thank you.
    Last edited by kander; 2008-01-10 at 08:20 PM.

  2. #2
    kander is offline Junior Member
    Join Date
    Jan 2008
    Posts
    3

    Default Re: Is there a way to have multiple relationships for a subpanel in 5.0 CE

    Can anybody help me with this problem? I would really appreciate it greatly.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 10
    Last Post: 2010-10-22, 12:03 PM
  2. represent multiple relationships between Account records
    By joealiferis in forum Developer Help
    Replies: 0
    Last Post: 2006-01-08, 05:23 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
  •