I have made a custom button 'download list' in detailview of my module , I also made an action 'downloadList' in my module's directory. OnClick of download list i called the action like
array('customCode' => '<input class="button" onclick="window.open(\'index.php?module=av_module&action=downloadList&record={$fields.id.value}&&sugar_body_only=true\');" value="Download List">')
all my code is doing well .
But the issue is i have to use views.detail.php to achieve same functionality . for that i made a custom views.detail.php file and wrote all my code in it .
Now i don't know how to call that function on button click. Can anyone help please...
We can assign the values to smarty variable like in following views.detail.php and can use the smarty variable in the detailveiwdefs as follwing:
$this->dv->ss->assign('mail_to_members', '<input type="button"
onclick="javascript: location.href=\'mailto:?bcc='.$mem_email.'\'" value="Mail to Members"/>');
By using following code in detailviewdefs.php
'buttons' =>
array (
5 =>
array (
'customCode' => '{$mail_to_members}',
),
),
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With