How to change PDF Invoice file name in V8.10.1

In V8.9.1 I did an edit on the generatePDF.php file to change the PDF file name. In V8.10.1 this does not work. Can you tell me what file to edit in the latest version. It seems the new file structure requires a different solution.

rsp,

I’m not sure what to do with the fix - could you maybe tell me what it is for and how to use it.
I mean I was running the beta version for a long time.
Now the final release and major file changes and a simple edit to the generatePdf.php file was easy.
Just would like to know how or what file to edit - I’m a drafter not a full time programer.

Do QR&R


You need to clear the Symfony cache by running the command on your SuiteCRM 8 instance root:

./bin/console cache:clear

and clear cache & hard reload on the browser

rsq,

I have cleared cache many times.
This is what I changed on the generatePdf.php which was working on V8.9.1
$file_name=str_replace(" ", “_”, $bean->name) . “-” . $bean->project_c . “.pdf”;
Now this line is ignored in V8.10.1
In fact I’m not sure if the file name is generated from this file anymore.

Hello Willie,

in 8.10.1 there has been a new ticket / some new code to change the PDF name.

The issue was:

and if you follow the code for the hotfix:

you’ll find that in the file: BasePDFManager.php
in the line 238 the PDF file name is defined:

$fileName = $this->getPdfName($module, $moduleBean->name);

I’ve not changed anything about this so far.
But you can test around now, changing this file to test things or better yet, build your own extension to make things upgrade safe: