Problems with relate field on listview

Hi everybody,
I got some problem on list view and not know how to fix it.

I have 2 module name: SCP_Lead and SCP_Company.
In SCP_Lead i have "Related Field"  SCP_Company.
But when i click on SCP_Company field on ListView it can't link to current Lead record and show the error "Error retrieving record. This record may be deleted or you may not be authorized to view it."

and the URL seem be wrong to :
index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DSCP_Company%26offset%3D3%26stamp%3D1398223190009391900%
It must be SCP_Lead instead of SCP_Company because i want i link to current Lead record.
Parents
  • Hi Tanphat911,

    This seems to be related to a known defect in the current release of Sugar, #66596. Your description is not identical to the description of the defect, but other users have had similar use cases that related back to the same issue. Please confirm what version of 6.5 you are running (6.5.16? 6.5.15? etc.) and I can look into getting you a hotfix package which should fix this issue for you.

    Thanks!
    Alex

    Alex Nassi
    Digital CX Operations Director
    SugarCRM

  • Hi Alex,

    I currently have the exact same issue on 6.5.17. Bug's status is fixed but I don't think it came with 6.5.17.
    And I can't make tanphat911's solution to work.

    Could you email me the hotfix?

    Thanks
  • Hello, I am having the same issue. Is there any possible way to solve this issue without code? I mean by configuring through the admin option. 

    Thank you. 
    Jonathan!
  • Hello Albert, Jon524, Mastershan, and Adrien,

    I am looking into obtaining a copy of the hotfix for the versions you all have and will update this conversation accordingly once I have more information.

    Thank you for your patience and I apologize for any delays,
    -Alex

    Alex Nassi
    Digital CX Operations Director
    SugarCRM

  • Hi Albert, Jon524, Mastershan, and Adrien,

    This hotfix has been sent to all of you. I hope this helps!

    -Alex

    Alex Nassi
    Digital CX Operations Director
    SugarCRM

  • Hi Alex, can I have a copy too please or can you let me know where to download it?

    We have CE 6.5.17 patched to 6.5.18

    Thank you..
  • Hi nhb123,

    This hotfix has been emailed to you as well.

    -Alex

    Alex Nassi
    Digital CX Operations Director
    SugarCRM

  • Hi Alex, thanks for sending this across. It doesn't seem to have fixed my issue after installing and repairing roles and running a quick repair.

    Whilst list view clickable links are fine for links to built in modules.. for those custom modules which I have set up relate fields and then included them in the listview.. the $ID metacode being retrieved and used to form the URL is that of the list item itself rather than the $ID of the related field.. so essentially I am getting malformed URL's..

    I know how to modify the URL's that are generated, so I could output text only, but if we want working clickable links then I have no idea!

    Is this something we can look into?

    Thanks a lot.

    EDIT:

    Yes it has fixed it, thank you very much. I had customised the code a fair bit.

    As long as I stick to this kind of format in listeviewdefs.php it works just fine:

     'VALUATION_C' =>   array (
        'type' => 'relate',
        'default' => true,
        'studio' => 'visible',
        'label' => 'LBL_VALUATION',
        'id' => 'X837A_VALUATIONS_ID_C',
        'link' => true,
        'width' => '10%',
      ),
  • I have the similar problem with related fields on Sugar Enterprise 6.5.20 :

    1) module father : bm_bm_office_room
    2) module child : bm_bm_floor

    the link that it produce seems correct but id is of the bm_bm_office_room and not of
    bm_bm_floor

    action=ajaxui#ajaxUILoc=index.php%3Fmodule%3Dbm_bm_floor%26offset%3D1%26stamp%3D1424269711055699800%26return_module%3Dbm_bm_floor%26action%3DDetailView%26record%3D5398d4a0-a4ad-c3b9-b730-54e496efdc4f

    In fact 5398d4a0-a4ad-c3b9-b730-54e496efdc4f is the id of bm_bm_office_room module.
     
    I checked the listviewdefs,php and vardefs.php and seems correct the field bm_bm_floor_id_c :

    listview :
    'OFFICE_FLOOR' =>
      array (
        'type' => 'relate',
        'studio' => 'visible',
        'label' => 'LBL_OFFICE_FLOOR',
        'id' => 'bm_bm_floor_id_c',
        'link' => true,
        'width' => '10%',
        'default' => true,
      ),

    vardefs :

    'office_floor' =>
      array (
        'required' => true,
        'source' => 'non-db',
        'name' => 'office_floor',
        'vname' => 'LBL_OFFICE_FLOOR',
        'type' => 'relate',
        'massupdate' => 0,
        'no_default' => false,
        'comments' => '',
        'help' => '',
        'importable' => 'true',
        'duplicate_merge' => 'disabled',
        'duplicate_merge_dom_value' => '0',
        'audited' => false,
        'reportable' => true,
        'unified_search' => false,
        'merge_filter' => 'disabled',
        'calculated' => false,
        'len' => '255',
        'size' => '20',
        'id_name' => 'bm_bm_floor_id_c',
        'ext2' => 'bm_bm_floor',
        'module' => 'bm_bm_floor',
        'rname' => 'name',
        'quicksearch' => 'enabled',
        'studio' => 'visible',
      ),


    How can solve it?
    Thanks






Reply
  • I have the similar problem with related fields on Sugar Enterprise 6.5.20 :

    1) module father : bm_bm_office_room
    2) module child : bm_bm_floor

    the link that it produce seems correct but id is of the bm_bm_office_room and not of
    bm_bm_floor

    action=ajaxui#ajaxUILoc=index.php%3Fmodule%3Dbm_bm_floor%26offset%3D1%26stamp%3D1424269711055699800%26return_module%3Dbm_bm_floor%26action%3DDetailView%26record%3D5398d4a0-a4ad-c3b9-b730-54e496efdc4f

    In fact 5398d4a0-a4ad-c3b9-b730-54e496efdc4f is the id of bm_bm_office_room module.
     
    I checked the listviewdefs,php and vardefs.php and seems correct the field bm_bm_floor_id_c :

    listview :
    'OFFICE_FLOOR' =>
      array (
        'type' => 'relate',
        'studio' => 'visible',
        'label' => 'LBL_OFFICE_FLOOR',
        'id' => 'bm_bm_floor_id_c',
        'link' => true,
        'width' => '10%',
        'default' => true,
      ),

    vardefs :

    'office_floor' =>
      array (
        'required' => true,
        'source' => 'non-db',
        'name' => 'office_floor',
        'vname' => 'LBL_OFFICE_FLOOR',
        'type' => 'relate',
        'massupdate' => 0,
        'no_default' => false,
        'comments' => '',
        'help' => '',
        'importable' => 'true',
        'duplicate_merge' => 'disabled',
        'duplicate_merge_dom_value' => '0',
        'audited' => false,
        'reportable' => true,
        'unified_search' => false,
        'merge_filter' => 'disabled',
        'calculated' => false,
        'len' => '255',
        'size' => '20',
        'id_name' => 'bm_bm_floor_id_c',
        'ext2' => 'bm_bm_floor',
        'module' => 'bm_bm_floor',
        'rname' => 'name',
        'quicksearch' => 'enabled',
        'studio' => 'visible',
      ),


    How can solve it?
    Thanks






Children