Results 1 to 5 of 5

Thread: Custom Module linked to Account; Not Showing in Account Subpanel

  1. #1
    Join Date
    May 2011
    Posts
    17

    Default Custom Module linked to Account; Not Showing in Account Subpanel

    Hello Forum;

    I am new to SugarCRM and I am doing some slight modifications for my use.

    I created a Custom Module and added a field to Relate the module to an Account. When I create a new record in the Custom Module and save it, it displays a link to the related Account. However, when I navigate to the related Account record, the related Custom Module record is not displayed in the subpanel.

    I can of course go to the subpanel, click the "Select" button and find the record I just created from the Custom Module. However, it seems like this should happen automatically.

    As a reference, I want this Module to work pretty much exactly like the Contacts Module.

    Am I missing something?

    Any thoughts are very much appreciated!

    Thank you,
    A.J.

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Custom Module linked to Account; Not Showing in Account Subpanel

    If you are using the "Relate Field" and NOT a actual relationship then the that "relationship" only shows up in the module and not the related module. Only actual relationships show up in the related modules.

    Relate fields are not really relationships, for the relationship to show up in another module it would have to be converted to a one-to-many or a one-to-one relationship and you would delete the relate field and use the relationship instead.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    Join Date
    May 2011
    Posts
    17

    Default Re: Custom Module linked to Account; Not Showing in Account Subpanel

    This worked - Thank you! I appreciate your fast response!

    Also, your description of Relate fields versus Relationships really helped clarify the distinction between the two functionalities. Thank you!

  4. #4
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Custom Module linked to Account; Not Showing in Account Subpanel

    I am glad I could help.

    Just to complete the job, I'd like to address (fer everyone else) why we have "relate fields" when at first glace they appear to merely be 1/2 relationships.

    Relate fields are best used when they relate to hidden modules (since they are hidden (no tab) you cant really see the other side of the relationship anyway). I use them when the 'Relationship' is just a way to make a group of selections like if I wanted a list of Schools, I would make a module for schools, add all the schools and then use a 'Relate Field' in the other module to tie them together. Then I can add and remove schools without editing a dropdown list. I have also used them with a hidden module that was just a conduit to another database. I made a custom module whos table was just a view on a table in another database. This let me relate items to records in that other database and I didnt need "other end" of the relationship for that either.

    Relate fields are also faster and more efficient database-wise than a standard relationship. Since there is only one end, there is no JOIN table to be included in each retrieve() event. The data is stored in the main table and so it can be retrieved from the database in one call instead of adding another INNER JOIN to the query.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  5. #5
    Join Date
    May 2011
    Posts
    17

    Default Re: Custom Module linked to Account; Not Showing in Account Subpanel

    I appreciate the additional explanation, and I'm willing to bet there will be others that will, too!

    From your example, I was able to solve a problem that I had made a "work-around" to deal with. Thank you!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. subpanel showing parent data of linked module?
    By eitrix in forum Developer Help
    Replies: 2
    Last Post: 2010-12-03, 10:15 AM
  2. Replies: 0
    Last Post: 2010-09-28, 09:57 PM
  3. linked field in subpanel for a custom module
    By itsteveg in forum Developer Help
    Replies: 4
    Last Post: 2009-01-20, 05:59 PM
  4. Replies: 1
    Last Post: 2008-04-10, 03:36 PM
  5. Replies: 0
    Last Post: 2005-10-15, 06:01 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
  •