Results 1 to 5 of 5

Thread: How to create field with link to detail view

  1. #1
    Systems Navigator is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    195

    Question How to create field with link to detail view

    I was wondering how to create a field that will link you to detail view. Now the links are only available for the name variables, but sometimes I want to assign that link to other fields. For example I created a cases module on which I want to click forward from listview to detail view by the casenumber I assigned to it. That casenumber is a custom field. So my question is: what code do I have to add to which file to create that link.

    Thanks a lot!

  2. #2
    ivolator's Avatar
    ivolator is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Dagobah
    Posts
    98

    Default Re: How to create field with link to detail view

    Please clarify from which module's ListView , what link from the list view and which module DetailView you are trying to click to.
    Also can you post the listviewdefs.php and the def of your custom field?

    Regards

  3. #3
    Systems Navigator is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    195

    Default Re: How to create field with link to detail view

    Quote Originally Posted by ivolator
    Please clarify from which module's ListView , what link from the list view and which module DetailView you are trying to click to.
    Also can you post the listviewdefs.php and the def of your custom field?

    Regards
    It is a copy of the orginal bugs module which I renamed to SNCases. After that I customized the whole module to our requirements. The field 'SNCASES_CASENUMBER_C' from the listviewdefs in the custom map is the field that has to be the link to the detail view of the SNCASE. In which file can I find the def of my custom field? I think it is also in the listviewdefs.php file.

    Thanks a lot for your help
    Attached Files Attached Files

  4. #4
    ivolator's Avatar
    ivolator is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Dagobah
    Posts
    98

    Default Re: How to create field with link to detail view

    First: Your custom field def is in cache/dynamic_fields/YOURMODULE/fields.php

    Anyways. So far my understanding is that from your custom module’s ListView you will have your SNCASES_CASENUMBER_C listed as a column (am I right?).
    … Then when you click on this link you want to go to the same module’s DetailView (am I right again? Hope yes ).
    If I was right in my assumptions then you just have to add to your SNCASES_CASENUMBER_C def ‘link’ => true in the listviewdefs.php.
    So, here:
    PHP Code:
      'SNCASES_CASENUMBER_C' => 
      array (
        
    'width' => 10,
        
    'label' => 'sncases_casenumber_c',
        
    'default' => true,
       
    'link' => true,
      ), 
    this will automatically link your field to the current module's DetailView

  5. #5
    Systems Navigator is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    195

    Default Re: How to create field with link to detail view

    Thank you very much. It was indead what I meant. I didn't expect it would be this easy. But it helps me very much.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 2008-11-14, 09:11 AM
  2. Replies: 0
    Last Post: 2006-07-11, 10:05 PM
  3. Replies: 0
    Last Post: 2006-05-04, 01:27 AM
  4. Replies: 0
    Last Post: 2005-11-23, 01:02 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
  •