Hi p_unterberg,
I create a link on Accounts Detail View using custom code in detailviewdefs.php.
In my case, I pass the Account ID in the Get String of the URL for a link and display the link next to the Account Name in Detail View. I don't use a button.
Just add a customCode line to custom/modules/Accounts/metadata/detailviewdefs.php like the one in the code below:
PHP Code:
'panels' =>
array (
'default' =>
array (
0 =>
array (
0 =>
array (
'name' => 'name',
'label' => 'LBL_NAME',
'customCode' => '{$fields.name.value} <a href="http://192.168.254.7/sugaracctinfo.php?AcctID={$fields.id.value}" target="_blank"><small>Zoom</small></a>',
),
Notice that you can reference the $fields array element in braces {$fields.name.value} to extract the desired field value. Note that I also display the name itself first using '{$fields.name.value}') so that the custom code does not replace the actual name field itself, but appears after it.
Phil
Bookmarks