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 Reply
  • 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%',
      ),
Children
No Data