Hi All,
Currently i am in quotes module
I have used the default templated provided by sugar for downloading the pdfs.
The Pdfs are downloading with the name of the Quote.
Is there a way i can add Quote_<name of the pdf > while downloading
Regards
Hi All,
Currently i am in quotes module
I have used the default templated provided by sugar for downloading the pdfs.
The Pdfs are downloading with the name of the Quote.
Is there a way i can add Quote_<name of the pdf > while downloading
Regards
Hello,
In include\Sugarpdf\sugarpdf\sugarpdf.pdfmanager.php in the preDisplay method, you will find the way SugarCRM define the default PDF filename :
$filenameParts = array();
if (!empty($this->bean) && !empty($this->bean->name)) {
$filenameParts[] = $this->bean->name;
}
if (!empty($pdfTemplate->name)) {
$filenameParts[] = $pdfTemplate->name;
}
$cr = array(' ',"\r", "\n","/");
$this->pdfFilename = str_replace($cr, '_', implode("_", $filenameParts ).".pdf");
So, I suppose that you can extend this property, using the same way as described by Cédric in this article : How to customize the Sugar PDF Manager « Sugar Developer Blog – SugarCRM
(and complete by https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_7.9/Architecture/SugarPDF/index.html )
Best regards,
Fred