I would like to how to add the print icon in suitecrm; like how it is in SugarCRM. How can I this, just to allow for the user to do a print. At the moment if I right click and it gibberish for the relationship fields.
Sorry, I donāt know how it is in SugarCRMā¦
Which view are you trying to print?
Would it be better to make a Report in the Reports module?
The user would like to print the case module; the detail view.
I see. Printing that from the browser seems to have all the information except the subpanels.
See if you can get something to look good from the reports module. If not, I think you need to create a custom entry-point to lay out the information your user requires for printing. Itās simple, but itās a code customizationā¦
It has the information but the relationship fields shows gibberish. Could you assist with the custom code, please?
Can you share a screenshot (here, for example: https://pasteboard.co ) ? I donāt see any gibberish and I wonder if something in your screens is broken.
The custom code could be a custom entry-point:
https://docs.suitecrm.com/developer/entry-points/#_creating_an_entry_point
Inside that, you access the database with SQL and dump good-looking HTML onto the screen, something straight-forward enough for the browser to print adequately. The advantage is that you can tailor it to what your user really wants.
Hereās a link to what the case looks like when it is printed https://pasteboard.co/IkTXSfU.jpg
I donāt get that on my Firefox.
Which browser are you using?
Can you try a different browser, just to see if it is the same?
In the browser that doesnāt display well, do you get any Javascript errors in your browserās developer console?
No I donāt get any. Iām not sure why you donāt get that on firefox and it is working for me.
Sorry, I canāt exactly make out the answers to my all questions from your brief answerā¦
I understand you donāt see Javascript errors, but the rest? Thanks
iām using firefox and Iāve tried other browsers and is the samething. Where action=ajax is the part Iām talking about; Iām sure if it because it is a relationship field.
Please try a few Repairs from Admin / Repairs:
- QR&R
- relationships
- anything Javascript related
On the first post you wrote āAt the moment if I right click and it gibberish for the relationship fields.ā
What do you mean you right-click? Then select what?
Do you see the broken bits immediately when you enter the detail view, or after doing something else? What? (maybe selecting print preview?)
Sorry I meant to say when I right click then click print, it shows the āgibberishā, but in the details that is not shown only when it is being printed. And it is also shown in the print preview; even after the repair
I could reproduce this now. Itās the āprintā stylesheet (thus only visible on āPrint Previewā or āPrintā) that has a āfeatureā to display the links. So the Account is a link and it shows you the Account name, and also what that links to (which is computer talk and human āgibberishā )
I will open an issue on Github to ask for this to be improved. It is related to a previous issue (https://github.com/salesagility/SuiteCRM/issues/1338)
Work-around:
Create a Bookmarklet to sanitize the page before printing.
In Firefox, make a new bookmark (you can put it in the toolbar on top) and call it for example āPrepare to Printā and make the address (or Location) like this:
javascript:(function(){r='@media print{a[href]:after {display:none !important}}'; var s=document.createElement('style'); s.appendChild(document.createTextNode(r)); document.body.appendChild(s); })();
Once you are in the page you want to print, pressing that should fix it.
EDIT: I opened a new Issue for this: https://github.com/salesagility/SuiteCRM/issues/7465
Iām not sure if I understand properly what it is that I should be doing
If you want to try the work around, in Firefox
-
click Bookmarks menu
-
in that menu, you want to create a new bookmark, you can right-click any folder or any toolbar and select āNew bookmarkā
-
give it a name like āPrepare to Printā
-
in the āLocationā box, paste that ugly code I gave earlier
Now your bookmark is created. It is called a ābookmarkletā because it contains an action to be applied on the page you are visiting, when you select that bookmark.
So
- go to the page you want to print in SuiteCRM
- select the bookmarklet. You wonāt see anything happen, butā¦
- now select print and it will not contain any links
I hope this helps
Ok that I got that to work but what about a long term fix for other users?
For that, follow the Issue I opened (link is above).
Thanks for reporting.