AnsweredAssumed Answered

Problem adding custom button to DetailView

Question asked by jlabuelo on Sep 29, 2014
Latest reply on Sep 30, 2014 by Francesca Shiekh
Hi there

I am trygin to add a new custom button to a DetailView following the developer guide. I have done this several times before in SugarCE 6.5 .

I have added the custom button to DetailViewDefs.php like this


<?php$module_name = 'Pacie_Pacientes';
$viewdefs [$module_name] = 
array (
  'DetailView' => 
  array (
    'templateMeta' => 
    array (
      'form' => 
      array (
        'buttons' => 
        array (
          0 => 'EDIT',
          1 => 'DUPLICATE',
          2 => 'DELETE',
    3 => 
          array (
            'customCode' => '<input title="{$APP.LBL_SOLICITAR_REAPERTURA_TITLE}" accessKey="{$APP.LBL_SOLICITAR_REAPERTURA_TITLE} "type="button" 
         class="button" onClick="document.location=\'index.php?module=Pacie_Pacientes&action=SolicitarReapertura&record={$fields.id.value}\'"name="finish" value="{$APP.LBL_SOLICITAR_REAPERTURA_TITLE}">',
          ),
          4 => 
          array (
            'customCode' => '<input title="{$APP.LBL_REAPERTURAR_TITLE}" accessKey="{$APP.LBL_REAPERTURAR_TITLE} "type="button" 
         class="button" onClick="document.location=\'index.php?module=Pacie_Pacientes&action=Reaperturar&record={$fields.id.value}\'"name="finish" value="{$APP.LBL_REAPERTURAR_TITLE}">',
          ),
        ),
      ),
'maxColumns' => '2',      'widths' => 
      array (
        0 => 

However when I run the QuickRepair, I get this error message and dont know why (see screenshot please).

Any ideas please???

Outcomes