Hello!
Is there a way to select multiple PDF templates to print when you are in a record?
See image - could I have checkboxes next to each template and select both to print at once?
Hello!
Is there a way to select multiple PDF templates to print when you are in a record?
See image - could I have checkboxes next to each template and select both to print at once?
Sorry, no, I donât think there is.
Which version of SuiteCRM are you on?
And is this the âGenerate letterâ option? I just want to make sure I really understood what you were referring to.
I am on:
Version 7.8.3
Sugar Version 6.5.24 (Build 509)
Yes this is âgenerate letterâ in list view OR Actions->Print PDF.
You would have to do some changes in the code to get what you want, itâs not currently a feature.
You can ask for it in GitHub, opening an Issue and suggesting it. However I donât think itâs likely that it will get done anytime soon, I have to warn youâŚ
Any pointers for where I could try to add the code for it? Iâm pretty new to SuiteCRM but I have been able to dig into the codebase a little bit and have made some (upgrade-safe) tweaks where needed.
And thank you for creating the issue and for the quick response!
I think that recently that pop up was modified to sort the list of templates (I am not 100% sure though).
Maybe you can search github to find the pr in which the pop up was modified and then browse thhough the files that were affected and maybe you can track were that happens.
I will do that, thank you!
The list is generated starting at line 60 and/or line 115 here:
https://github.com/sgaved/SuiteCRM/blob/52bbad468fba4bff0e0764d074f937f2c4602631/modules/AOS_PDF_Templates/formLetter.php
So adding the checkboxes shouldnât be difficult.
Now you have to reverse engineer further to find where the template is used to generate the pdf.
The generated link (or better, the javascript that redirects) looks like this:
onclick=âdocument.getElementById(âpopupDiv_araâ).style.display=ânoneâ;sListView.send_form(true, âContactsâ, âindex.php?templateID=33804420-dee1-a5b5-5692-594d1f044198&entryPoint=formLetterâ,âPlease select at least 1 record to proceed.â);document.getElementById(âpopupDivBack_araâ).style.display=ânoneâ;â
Ant that entrypoint âformLetterâ is registered to this file:
modules/AOS_PDF_Templates/formLetterPdf.php
so thatâs where you want to get the selection from the pop-up and apply it.
P.S. - when itâs done donât forget to donate the code to the community!
Thank you both. I should have time to do this within the next week!
Hello everyone I know this topic is old.
However, I am looking for the same thing.
Has anyone found a solution since 2017?
Take care of yourself
Quentin
no one ?
If youâre not a developer, and you really need this, consider purchasing the services of a developer to do it for you. It shouldnât be too hard. But I think itâs too hard for someone to provide just for a Forums post replyâŚ
Hello ,
Thank you for the feedback
Do you know a developer who can do this for me?
Thank you
Quentin
I will answer you in a Private Message.