Results 1 to 9 of 9

Thread: Making a field clickable in subpanel

  1. #1
    Socal is offline Member
    Join Date
    Jun 2010
    Posts
    18

    Default Making a field clickable in subpanel

    I have created a simple basic module with 5 fields.
    This new module is linked to the Contacts module in a Many to 1 relationship.
    When I review a contact, I see the new module in the subpanel which has a "Create" and "Select" button.
    I can click "Create" and fill in the fields and save the new record for this new module.

    If I then return back to the "Contact" record, I now see the row in the subpanel for this new module but there is no field that is selectable to allow me to view the the new module's record.

    What do I need to do to make one of the fields selectable - to allow me to click the filed and review the new record?

    Thanks

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Making a field clickable in subpanel

    Hi,

    Check file modules/CUSTOM_MODULE/metadata/subpanels/default.php

    Add following piece of code in the field you want link in

    PHP Code:
            'widget_class' => 'SubPanelDetailViewLink'
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  3. #3
    Socal is offline Member
    Join Date
    Jun 2010
    Posts
    18

    Default Re: Making a field clickable in subpanel

    Thanks for the advice. I was looking in the wrong place for a solution,.

    Is this not something that Module Builder should be doing without the need to manually modify the generated code?

    Thanks

  4. #4
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Making a field clickable in subpanel

    Hi,
    No that can't be done from Module Builder.

    You have to change from code.


    For any queries or customization feel free to contacts me on skype.

    Skype id : david__boris
    Last edited by davidboris; 2010-07-04 at 05:59 AM.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  5. #5
    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: Making a field clickable in subpanel

    You also need to specify the module:


    PHP Code:
                'widget_class' => 'SubPanelDetailViewLink',
                 
    'module' => '<Add Module name here>'
    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.

  6. #6
    Socal is offline Member
    Join Date
    Jun 2010
    Posts
    18

    Default Re: Making a field clickable in subpanel

    andopes
    The suggestion made by davidboris to enter the single line into
    modules/CUSTOM_MODULE/metadata/subpanels/default.php
    worked perfectly for me without your suggested second line.

    Is the location specified in the first suggestion not the correct location to enter this line of code as it is in the specific module itself?.
    So maybe that is why there is no need to restate the module name in the code snippet.

    \My only 'problem' is that every time I redeploy the custom module, I lose the update and have to keep re-entering it.

    If there is a preferred location to enter the code - please let me know.

    David
    Last edited by Socal; 2010-07-06 at 12:33 AM.

  7. #7
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Making a field clickable in subpanel

    Hi,

    If you are re-deploying your custom module, you need to change the file

    custom/modulebuilder/packages/PACKAGE_NAME/modules/CUSTOM_MODULE/metadata/subpanels/default.php
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  8. #8
    Socal is offline Member
    Join Date
    Jun 2010
    Posts
    18

    Default Re: Making a field clickable in subpanel

    davidboris
    Thanks for this info.

    As that code and structure was created during the module build process, I am still at a bit of a loss as to why this capability is not built into Module Builder itself.

  9. #9
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Making a field clickable in subpanel

    Hi,

    This functionality works by default for "name" field. It is not available in studio or module builder.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Rename subpanel tab + clickable
    By dante2010 in forum Help
    Replies: 2
    Last Post: 2009-09-13, 05:03 PM
  2. Cannot Get Subpanel to have a clickable link
    By cmcfarland425 in forum Help
    Replies: 6
    Last Post: 2008-08-09, 04:38 AM
  3. Cannot Get Subpanel to have a clickable link
    By cmcfarland425 in forum Downloads
    Replies: 1
    Last Post: 2008-06-30, 02:32 AM
  4. Making fields clickable
    By Jamman960 in forum Help
    Replies: 1
    Last Post: 2006-03-07, 03:00 PM
  5. Making a website field Clickable
    By sugaruser555 in forum Help
    Replies: 8
    Last Post: 2005-07-12, 03:36 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
  •