AnsweredAssumed Answered

Add download pdf button in popup view

Question asked by karl el escobar on Apr 4, 2019
Latest reply on Apr 4, 2019 by Cesar Obed Gonzalez N.

Is it possible to add a custom button that downloads pdf ?

ive tried doing it but i only get create button from this example: Link here

 

'searchInputs' => array(
    1 => 'payment_date',
    2 => 'payment_stage',
    3 => 'or_no',
),
'create' =>
    array(
        'formBase' => 'PrintPayment.php',
        'formBaseClass' => 'PrintPayment',
        'getFormBodyParams' => array('', '', 'PrintPaymentSave'),
        'createButton' => $mod_strings['LNK_NEW_PAYMENT']

    ),

 

<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/SugarObjects/forms/FormBase.php');

class PrintPayment extends FormBase {

    var $moduleName = 'PrintPayment';
    var $objectName = 'PrintPayment';

    function handleSave($prefix, $redirect=true, $useRequired=false){
        require_once('include/formbase.php');
        $focus = new PrintPayment();
        $focus = populateFromPost($prefix, $focus);
        $focus->save();

    }
}

is there any other way to add an download functionality ?

Outcomes