Ok im a little stuck and was wondering if anyone had any ideas
I have 2 modules, one called Electricity and one called accounts. if i go in to the accounts module i have a subpanel for electricity and have managed to use the below code to make a custom field linkable but get the following error with it:
\custom\modules\elecy_Electricity\metadata\subpane ls\Account_subpanel_accountselecy_electricity.php
Error retrieving record. This record may be deleted or you may not be authorized to view it.
I have exactly the same code in the electricity module and it works and takes me to the correct record.Code:<?php // created: 2011-12-21 11:38:45 $subpanel_layout['list_fields'] = array ( 'mpan_core_c' => array ( 'type' => 'varchar', 'default' => true, 'vname' => 'LBL_MPAN_CORE', 'link' => 'MPAN_CORE_LINK', 'link' => true, 'widget_class' => 'SubPanelDetailViewLink', 'target_module' => 'elecy_Electricity', 'target_record_key' => 'MPAN_CORE_C', 'width' => '20%', ),
custom\modules\elecy_Electricity\metadata\listview defs.php
Code:<?php $module_name = 'elecy_Electricity'; $listViewDefs [$module_name] = 'MPAN_CORE_C' => array ( 'type' => 'varchar', 'default' => true, 'link' => true, 'widget_class' => 'SubPanelDetailViewLink', 'target_module' => 'elecy_Electricity', 'target_record_key' => 'mpan_core_c', 'label' => 'LBL_MPAN_CORE', 'width' => '15%', ),
thanks


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks