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.